potential error in fdlibm asin
joe darcy
joe.darcy at oracle.com
Mon Dec 5 18:17:19 UTC 2016
FYI, if you want to check the value an fdlibm function against another
implementation, you could use the Correctly Rounded mathematical library
(CRlibm) as a reference:
http://lipforge.ens-lyon.fr/www/crlibm/
The relevant function in this case would be asin_rn.
As its name implies, CRlibm aims to return the floating-point value
closed to the exact one. The java.lang.Math error requirement for asin
is 1 ulp; therefore, if not identical the fdlibm asin result and the
CRlibm asin_rn result should be adjacent floating-point numbers.
HTH,
-Joe
On 12/5/2016 2:30 AM, Volker Simonis wrote:
> On Mon, Dec 5, 2016 at 11:10 AM, Andrew Haley <aph at redhat.com> wrote:
>> On 02/12/16 14:24, Lindenmaier, Goetz wrote:
>>> I found one copy of this code in the internet where the "else" is removed,
>>> but it's not completely the same:
>>> https://github.com/jerryscript-project/jerryscript/blob/master/jerry-libm/asin.c
>>>
>>> Does anybody have the knowledge to tell me what's wrong?
>>> Does anybody know how to contribute a fix to netlib fdlibm?
>> I think the only way to proceed with this is to find an input argument
>> which is affected by this very odd code. If there is one. does it
>> give a correct or an incorrect result? If not, we don't care and it
>> can be tidied up later.
> What would be the ultimate reference to to compare a potentially
> incorrect result against if "the Java math library is defined with
> respect to fdlibm version 5.3" [1] ?
>
> [1] https://docs.oracle.com/javase/8/docs/api/java/lang/StrictMath.html
>> Andrew.
>>
More information about the core-libs-dev
mailing list