[Top][All Lists]

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

[Octave-bug-tracker] [bug #44245] sprintf ("%0X", 15.2) prints floating

From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #44245] sprintf ("%0X", 15.2) prints floating point number 15.2 rather than 'F'
Date: Mon, 16 Feb 2015 17:44:16 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.2.0

Follow-up Comment #6, bug #44245 (project octave):

Yes, it is different.

Also, a format like '%bX' appears to say take the value, convert it to double,
and print the hex representation of the bits.  So that is not what you are
expecting for the 15.2 value.  Instead it is some 16-character hex string that
represents the bytes corresponding to the double precision floating point

We could have a warning about these formats when converting non-integer
values.  I suppose it should be disabled by the --traditional option.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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