[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #53496] mod: mod(nx,-x) producing -0
From: |
Michael Leitner |
Subject: |
[Octave-bug-tracker] [bug #53496] mod: mod(nx,-x) producing -0 |
Date: |
Wed, 28 Mar 2018 07:16:09 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:47.0) Gecko/20100101 Firefox/47.0 |
Follow-up Comment #3, bug #53496 (project octave):
Signed zero is required by IEEE 754, which Octave follows (and Matlab too, I
think). Whether it is sensible to return -0 here I have no idea, but I also
don't see when it is sensible to compute modulo negative integers. But before
you call this a Matlab incompatibility, try 1/mod(12,-3), because Matlab also
handles -0, but just doesn't display it.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?53496>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #53496] mod: mod(nx,-x) producing -0, Dildar Sk, 2018/03/28
- [Octave-bug-tracker] [bug #53496] mod: mod(nx,-x) producing -0, John W. Eaton, 2018/03/28
- [Octave-bug-tracker] [bug #53496] mod: mod(nx,-x) producing -0, John W. Eaton, 2018/03/28
- [Octave-bug-tracker] [bug #53496] mod: mod(nx,-x) producing -0,
Michael Leitner <=
- [Octave-bug-tracker] [bug #53496] mod: mod(nx,-x) producing -0, Rik, 2018/03/28
- [Octave-bug-tracker] [bug #53496] mod: mod(nx,-x) producing -0, Dildar Sk, 2018/03/28
- [Octave-bug-tracker] [bug #53496] mod: mod(nx,-x) producing -0, Dildar Sk, 2018/03/28
- [Octave-bug-tracker] [bug #53496] mod: mod(nx,-x) producing -0, Rik, 2018/03/28