, Nasser Ebrahim
, core-libs-dev Libs ,
"i18n-...@openjdk.java.net"
Date: 09/27/2018 01:55 AM
Subject: Re: RFR: JDK-8211161: java.lang.ArithmeticException:
divide by zero from java.text.DecimalFormat.format()
Hi, Nasser, Joe,
I agree with Joe as to the assessment on DecimalFormat
Hi, Nasser, Joe,
I agree with Joe as to the assessment on DecimalFormat code. The
existing code looks correct. Unless there is any obvious need to replace
the piece with bit operation, I'd just leave it as is. The jira issue
can be transferred to HotSpot, though.
Naoto
On 9/26/18 11:14 AM,
Hi Nasser,
On 9/26/2018 10:44 AM, Nasser Ebrahim wrote:
Hi Joe,
Thank you for your review comments.
I agree with you that the specification says that "The floating-point
operations of the Java Virtual Machine do not throw exceptions, trap,
or otherwise signal the IEEE 754 exceptional condit
change the
component of this bug. Please comment.
Thank you,
Nasser Ebrahim
From: joe darcy
To: Nasser Ebrahim , core-libs-dev Libs
Date: 09/26/2018 10:29 PM
Subject: Re: RFR: JDK-8211161: java.lang.ArithmeticException:
divide by zero from java.text.DecimalFormat.format(
Hello,
It may be reasonable to replace a divide by zero with check for a
floating-point -0.0 with a bit-level check, but the stated motivation is
not reasonable.
The Java platform requires that floating-point divide by zero return an
infinity (or NaN as the case may be) and it is *incorrect*
Hello,
In java.text.DecimalFormat.format(), there is a validation to check
whether a number is negative zero or not and for that divide by zero is
used to check for negative infinity which caused the ArithmeticException
when SIGFPE is enabled in the system. Andrew has opened a bug on my
behalf