Commit 737c87df by Warren Levy Committed by Warren Levy

* java/math/BigDecimal.java (divide): Fixed comment.

From-SVN: r38862
parent 69848904
2001-01-10 Warren Levy <warrenl@redhat.com> 2001-01-10 Warren Levy <warrenl@redhat.com>
* java/math/BigDecimal.java (divide): Fixed comment.
2001-01-10 Warren Levy <warrenl@redhat.com>
Fix for PR libgcj/1596: Fix for PR libgcj/1596:
* java/math/BigDecimal.java (divide): Check newScale for validity. * java/math/BigDecimal.java (divide): Check newScale for validity.
Ensure that BigInteger.pow() is called with a non-negative value. Ensure that BigInteger.pow() is called with a non-negative value.
......
...@@ -146,7 +146,7 @@ public class BigDecimal extends Number implements Comparable { ...@@ -146,7 +146,7 @@ public class BigDecimal extends Number implements Comparable {
if (power < 0) if (power < 0)
{ {
// Effectively increase the scale of val to avoid an // Effectively increase the scale of val to avoid an
// IllegalArgumentException for a negative power. // ArithmeticException for a negative power.
valIntVal = valIntVal.multiply (BigInteger.valueOf (10).pow (-power)); valIntVal = valIntVal.multiply (BigInteger.valueOf (10).pow (-power));
power = 0; power = 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment