Details
-
Type:
Defect
-
Status:
Closed
-
Priority:
Major
-
Resolution: Declined
-
Affects Version/s: Release 1.4
-
Fix Version/s: None
-
Component/s: None
-
Labels:
-
Environment:Linux 3.2.0-24-generic #39-Ubuntu SMP i686 GNU/Linux
Description
Hi,
As discussed on the mailing list in the message "When arithmetic on a computer bite back" (01/jun)
There may be bug in the way quotient is implemented for bigdec.
user> (quot 1.4411518807585587E17 2) ;; correct with doubles
7.2057594037927936E16
user> (quot 1.4411518807585587E+17M 2) ;; wrong with BigDecs
72057594037927935M
–
Laurent
I can reproduce the bug when using BigDecimal constructor on String.
See attached file for a test class.
More infos :
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.1) (6b24-1.11.1-4ubuntu3)
OpenJDK Client VM (build 20.0-b12, mixed mode, sharing)