[Top][All Lists]

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

[Octave-bug-tracker] [bug #51515] sprintf not rounding as Matlab does

From: Rik
Subject: [Octave-bug-tracker] [bug #51515] sprintf not rounding as Matlab does
Date: Thu, 20 Jul 2017 19:23:50 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0

Update of bug #51515 (project octave):

                Severity:              3 - Normal => 2 - Minor              
                Priority:              5 - Normal => 3 - Low                


Follow-up Comment #5:

Thanks for testing.  Hopefully someone else can try a different platform just
to be sure.  For example, this article from Stack Overflow
shows that Windows Visual Studio and GCC perform different rounding in exactly
the way you are experiencing.

The simplest thing, for the moment, would be to call round() yourself on any
data you want formatted in a particular fashion.

The rounding mode could be set as a whole for the C math library by using
fsetround.  But that might be overkill for this.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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