Log2 and beta test failures

Michael Goffioul michael.goffioul at gmail.com
Tue May 6 03:05:37 CDT 2008


On Tue, May 6, 2008 at 8:35 AM, Jaroslav Hajek <highegg at gmail.com> wrote:
>  I don't have other g++ versions or compilers to try. Ben, Michael, can
>  you try this fragment with your configurations? I don't see any
>  obvious bug in the xlog2 mappers, so I guess this may be the cause.

On MSVC, I get (0,inf) whatever the optimization level. I did the same
with cygwin gcc-3.4.4 and it gave me (nan,inf) whatever the optimization
level.

However, the test failures I reported are not related to that, but
to the second form of xlog2:

double xlog2(double x, int& exp)

when x = Inf. This results in a call to frexp with infinite value.
I tested it under MSVC and I got:

frexp(Inf) => NaN, -1

but from the test code in src/data.cc, it seems the expected
values are

frexp(Inf) => Inf, 0

Michael.


More information about the Octave-maintainers mailing list