[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #37882] printf('%4d', -0) prints 0
From: |
Michael Godfrey |
Subject: |
[Octave-bug-tracker] [bug #37882] printf('%4d', -0) prints 0 |
Date: |
Wed, 12 Dec 2012 16:07:30 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20100101 Firefox/17.0 |
Follow-up Comment #1, bug #37882 (project octave):
But, I just noticed that
x = -0;
printf('%4gn', x);
yields:
-0
So, should %d and %g produce different signs?
Oh, I just checked Matlab and the current Octave
behavior matches Matlab. Ugh!
Someday it may be a useful idea to have a Section
in the Manual titled "Matlab nonsense not
provided in Octave." This behavior is a candidate.
By the way, Octave is already different from Matlab
in that in Matlab:
x = -0;
x
yields
0
I hope that no one wants to change the behavior
of Octave to match this.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?37882>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/