octave-maintainers
[Top][All Lists]
Advanced

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

Re: 3-digit exponent on Windows systems


From: Michael Goffioul
Subject: Re: 3-digit exponent on Windows systems
Date: Tue, 12 Nov 2013 15:11:54 -0500

On Tue, Nov 12, 2013 at 3:00 PM, Rik <address@hidden> wrote:
11/12/13

All,

There are 3 failing tests in assert.m which arise from the fact that Windows systems display scientific notation with 3 digits in the exponent.  Although this seems not to follow the C++/C standard (https://groups.google.com/forum/?_escaped_fragment_=topic/comp.lang.c%2B%2B.moderated/GL7lutrLNoU#!topic/comp.lang.c%2B%2B.moderated/GL7lutrLNoU) it's what were stuck with.  The failing tests can be worked around by looking for a slightly different regular _expression_ to indicate success.  However, when compiling with MSVC there appears to be a way to switch the compiler to using 2-digit format (http://stackoverflow.com/questions/9226400/portable-printing-of-exponent-of-a-double-to-c-iostreams).

#ifdef _MSC_VER
        // Set scientific format to print two places.
        _set_output_format(_TWO_DIGIT_EXPONENT);
#endif

It might be useful to try and put that code snippet in Octave, but I don't compile with MSVC and without a way to verify things I'm sure I would screw it up.


If you can provide a patch against 3.7.7, I can test it for you. I recently recompiled 3.7.7 with MXE/MSVC, so I know it compiles fine. So it's easy for me to include an additional patch and start the compilation.

Michael.


reply via email to

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