octave-bug-tracker
[Top][All Lists]
Advanced

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

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


From: Rik
Subject: [Octave-bug-tracker] [bug #44245] sprintf ("%0X", 15.2) prints floating point number 15.2 rather than 'F'
Date: Mon, 16 Feb 2015 21:41:10 +0000
User-agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)

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

Oh bother Matlab!

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

If you can do that I think that is the best way to support this.  It's unclear
how much code relies on the current Octave implementation, but at least the
warning would flush it out.

I will take a look at the 1367 instances of printf in core and fix them.

What does Matlab do with the string format specification and a double value? 
Does it also print out using '%g'?


sprintf ('%s\n', 15.2)



    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?44245>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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