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

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

[Octave-bug-tracker] [bug #53496] mod: mod(nx,-x) producing -0


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #53496] mod: mod(nx,-x) producing -0
Date: Wed, 28 Mar 2018 07:14:36 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

Follow-up Comment #1, bug #53496 (project octave):

Matlab may compute -0, but it doesn't display it.

What does


x = mod (11, -1);
1/x


show you?  If the result of 1/x is -Inf, then x is -0, but it is not
displayed.  I think it makes sense to display the value as -0, since that has
meaning in floating point arithmetic.

That you have been finding things that are well known but may be confusing to
new users makes me think that it might be good to have them all documented in
a single place.  The FAQ on the wiki might be a good place if these items are
not already there.  Things I can think of now are

* Inf * i ==> (NaN + InfI)

* Computation and display of -0

* Comparison of complex numbers with <, <=, >, >= vs. min and max functions

* String class vs. character arrays

* What it means for Octave to be compatible with Matlab

Anything else?


AC_INIT([GNU Octave], [4.3.0+], [https://octave.org/bugs.html], [octave])
>>>>>>> merge rev
 

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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