BigDecimal fixlets
Mark Wielaard
mark@klomp.org
Fri Feb 14 09:57:00 GMT 2003
Hi,
The following fixed all remaining BigDecimal failures in Mauve. The
divide() fixlet makes sure that the scale is set even in the special
case of a ZERO result. (Fixes ssc005 and ssc006.) The String constructor
fixlet implements the pedantic reading of the spec where a zero
significant can be interpreted specially in the sentence: "in every
case, the resulting BigDecimal is equal to significand à 10^exponent".
(Fixes div376, mul038 and sca007.) Note that those last three do fail in
the Blackdown-1.4.1-beta which I tested against. So the test might be a
bit to pedantic, but Sun is known for not always following their own
spec when it comes to parsing/decoding numeric types.
2003-02-14 Mark Wielaard <mark@klomp.org>
* java/math/BigDecimal.java (BigDecimal(String)): Always set scale to
zero when there is an exponent and the significant is zero.
(divide): Always set scale to newScale even in special ZERO case.
OK for mainline and branch?
Cheers,
Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BigDecimal.patch
Type: text/x-patch
Size: 958 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20030214/180e5fe9/attachment.bin>
More information about the Java-patches
mailing list