[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #53496] mod: mod(nx,-x) producing -0
From: |
Dildar Sk |
Subject: |
[Octave-bug-tracker] [bug #53496] mod: mod(nx,-x) producing -0 |
Date: |
Wed, 28 Mar 2018 04:13:45 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36 |
URL:
<http://savannah.gnu.org/bugs/?53496>
Summary: mod: mod(nx,-x) producing -0
Project: GNU Octave
Submitted by: hodor123456
Submitted on: Wed 28 Mar 2018 08:13:44 AM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Other
Status: None
Assigned to: None
Originator Name: Dildar Sk
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: GNU/Linux
_______________________________________________________
Details:
In MATLAB,
>> mod(11,-1)
ans =
0
>> mod(12,-2)
ans =
0
>> mod(15,-3)
ans =
0
>>
In Octave,
>> mod(13,-1)
ans = -0
>> mod(12,-3)
ans = -0
>> mod(15,-3)
ans = -0
So, for any integer n,x mod(nx,-x) giving -0.
What's the point of producing -0 when 0 and -0 is
same?
_______________________________________________________
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 <=
- [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, 2018/03/28
- [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