logic in Math.nextAfter for handling -0.0 input

Deneau, Tom tom.deneau at amd.com
Mon Jun 23 22:31:43 UTC 2014


On closer inspection, I think the nextAfter(Infinity, Infinity) case was failing because
of the way I was checking that the actual was within 1 ULP of the expected.

-- Tom

From: Tom Rodriguez [mailto:tom.rodriguez at oracle.com]
Sent: Monday, June 23, 2014 5:12 PM
To: Deneau, Tom
Cc: graal-dev at openjdk.java.net
Subject: Re: logic in Math.nextAfter for handling -0.0 input

Can you show me your actual test code which failing?

tom

On Jun 23, 2014, at 3:10 PM, Deneau, Tom <tom.deneau at amd.com<mailto:tom.deneau at amd.com>> wrote:


Sorry, in the real test code it was not negated...

-- Tom


From: Tom Rodriguez [mailto:tom.rodriguez at oracle.com]
Sent: Monday, June 23, 2014 5:06 PM
To: Deneau, Tom
Cc: graal-dev at openjdk.java.net<mailto:graal-dev at openjdk.java.net>
Subject: Re: logic in Math.nextAfter for handling -0.0 input

Why are you negating NEGATIVE_INFINITY?

tom

On Jun 23, 2014, at 2:55 PM, Deneau, Tom <tom.deneau at amd.com<mailto:tom.deneau at amd.com>> wrote:



    double direction = (gid & 1) == 0 ? Double.POSITIVE_INFINITY : -Double.NEGATIVE_INFINITY;



More information about the graal-dev mailing list