Mon 31 Jul 2017 07:08:07 PM UTC, comment #2:
I really hate coding for Windows!
Odds are that this is related to the switch to using frexp from the std library.
According to the reference you provide, while the exponent is implementation dependent, the argument is not and should be Inf. This points to a potential bug upstream in the C library on the platform you are using. Where is the C library coming from? Do we ship that with MXE, is it coming from MingGW, or is it provided by Microsoft?
The following C++ program can be compiled stand-alone to see what the C library returns.
|
Mon 31 Jul 2017 05:56:07 PM UTC, original submission:
The BIST test for log2 is failing on Windows since a few weeks (tested with hg id e56d84a16a2e):
CC'ing Rik because this might be related to the recent change to use standard library functions:
http://hg.savannah.gnu.org/hgweb/octave/rev/4c048a2792bc
Calling "log2" with one or two output argument gives these results on Windows:
The same on Linux (correct):
The results when calling with one output argument are correct.
The results with two output arguments (effectively calling frexp) fail on Windows.
With 4.2.1 (and a dev build from March I found on my disk, hg id a470f7fee1cf), the results were still correct on Windows.
Should we return to use gnulib for frexp?
According to [1], behaviour for +/-Inf is implementation specific. Is mingw/gcc/glibc/Windows not IEC 60559 compliant?
[1] http://en.cppreference.com/w/cpp/numeric/math/frexp
|