[Top][All Lists]

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

Re: cosl test failure

From: Simon Josefsson
Subject: Re: cosl test failure
Date: Fri, 22 Jan 2010 10:54:15 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux)

Bruno Haible <address@hidden> writes:

> Hi Paolo,
> I added trivial tests for the mathl functions, that verify that
>   1) there are no link errors,
>   2) on a randomly picked value, the function's result is correct
>      to 10 decimal digits.
> For the cosl() function, when compiled from the gnulib sources, this
> test fails. Seen on OpenBSD/x86, Solaris/SPARC, Cygwin. gdb shows this:
>   Breakpoint 1, main () at test-cosl.c:40
>   40        ASSERT (y >= 0.8253356149L && y <= 0.8253356150L);
>   (gdb) print y
>   $1 = 0.82533762773239849330764172918861732
> It seems that the result has an accuracy of only 6 decimal digits,
> i.e. 'float' precision, only!

I see this too on cygwin.  Does POSIX require that cosl return values
with long double precision?  I can't find anything specific on


But maybe it is specified generally?

If there is no requirement on cosl to return long double precision data,
I'm not sure testing for that is useful.

Alternatively, gnulib could provide a replacement cosl that provides
better precision...


reply via email to

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