The result of Math.log(3.0) is different on x86_64 and aarch64?

Deshpande, Vivek R vivek.r.deshpande at intel.com
Thu Aug 1 00:43:30 UTC 2019


Hi Andrew

We have used the assembly code generated from the Intel Libm Math library as intrinsics and they follow the Spec as you have mentioned in your earlier email.
Let me know if need any more information.

Regards,
Vivek

-----Original Message-----
From: Andrew Dinn [mailto:adinn at redhat.com] 
Sent: Monday, July 29, 2019 7:44 AM
To: Martin Buchholz <martinrb at google.com>
Cc: Pengfei Li (Arm Technology China) <Pengfei.Li at arm.com>; bo zhaobo <bzhaojyathousandy at gmail.com>; Tianhua huang <huangtianhua223 at gmail.com>; Deshpande, Vivek R <vivek.r.deshpande at intel.com>; nd <nd at arm.com>; jdk-dev at openjdk.java.net; aarch64-port-dev at openjdk.java.net
Subject: Re: The result of Math.log(3.0) is different on x86_64 and aarch64?

On 29/07/2019 15:25, Martin Buchholz wrote:
> I was surprised to see the doc of Math.log make it explicit:
> 
> https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang
> /Math.html#log(double)
> 
> """The computed result must be within 1 ulp of the exact result. 
> Results must be semi-monotonic."""

Yes, indeed. I had to look up semi-monotonic even though I really ought to have known what it meant :-)

Anyway, there is no surprise really once you correlate the thoroughness of that documentation (and the rest ...) with the inestimably efficient purring of the engine that is Joe Darcy's brain. This is one area that really can be nailed down by spec and it is very nice to see that it has been.

regards,


Andrew Dinn
-----------



More information about the jdk-dev mailing list