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

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

[Octave-bug-tracker] [bug #37903] difference between int32(-44) and -44


From: Michael Godfrey
Subject: [Octave-bug-tracker] [bug #37903] difference between int32(-44) and -44
Date: Tue, 11 Dec 2012 20:58:10 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20100101 Firefox/17.0

URL:
  <http://savannah.gnu.org/bugs/?37903>

                 Summary: difference between int32(-44) and -44
                 Project: GNU Octave
            Submitted by: godfrey
            Submitted on: Tue 11 Dec 2012 08:58:08 PM GMT
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: None
             Assigned to: None
         Originator Name: godfrey
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any

    _______________________________________________________

Details:

The Manual says floor(x) returns the largest integer not greater than x.  For
x type double this is what it does.  But for x int32
floor(int32(-44)/10) is -4.  floor(-44/10)  is -5.  And, even worse,
floor(int32(-46)/10) is -5.  This is not
consistent with the Manual or help, but it is what Matlab does!!

So, is this a documentation problem, or could
it behave in a more reasonable way despite Matlab?






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?37903>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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