[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #45174] num2str produces different results fro
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #45174] num2str produces different results from Matlab for some corner cases |
Date: |
Wed, 17 Jun 2015 19:55:53 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:32.0) Gecko/20100101 Firefox/32.0 |
Update of bug #45174 (project octave):
Status: Confirmed => Fixed
Open/Closed: Open => Closed
_______________________________________________________
Follow-up Comment #6:
I rebased your cset to the dev branch and applied it here
(http://hg.savannah.gnu.org/hgweb/octave/rev/f357e076776f)
With regards to comment #2 and and when the '%e' format should be applied, the
documentation says:
Notable Behavior of Conversions with Formatting Operators
Numeric conversions print only the real component of complex numbers.
If you specify a conversion that does not fit the data, such as a string
conversion for a numeric value, MATLABĀ® overrides the specified conversion,
and uses %e.
Example: '%s' converts pi to 3.141593e+00.
If you apply a string conversion (%s) to integer values, MATLAB converts
values that correspond to valid character codes to characters.
Example: '%s' converts [65 66 67] to ABC.
Thus, it appears to apply only to the %s and %c conversions which your patch
covers.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?45174>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/