octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #61132] Colon operator fails for int64 and uin


From: anonymous
Subject: [Octave-bug-tracker] [bug #61132] Colon operator fails for int64 and uint64
Date: Wed, 8 Sep 2021 21:19:48 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0

URL:
  <https://savannah.gnu.org/bugs/?61132>

                 Summary: Colon operator fails for int64 and uint64
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Thu 09 Sep 2021 01:19:46 AM UTC
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Unexpected Error or Warning
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: dev
         Discussion Lock: Any
        Operating System: GNU/Linux

    _______________________________________________________

Details:

This problem happens for int64 and uint64 types on Octave 7:


octave:16> lo = uint64(10) ^ 17      
lo = 100000000000000000
octave:17> hi = lo + 1e3
hi = 100000000000001000
octave:18> class(lo)
ans = uint64
octave:19> class(hi)
ans = uint64
octave:20> lo < intmax ("uint64")
ans = 1
octave:21> hi < intmax ("uint64")
ans = 1
octave:22> rng = (lo:hi)
error: colon operator upper bound invalid (not an integer or out of range for
given integer type)


The values lo and hi are within the legal range for int64 and uint64 but the
colon operator fails when trying to create what should be a valid range.




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61132>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]