Commit Graph

25 Commits

Author SHA1 Message Date
Brian Burkhalter
6c5c2d745a 6378503: In java.math.BigDecimal, division by one returns zero
6446965: Using BigDecimal.divideToIntegralValue with extreme scales can lead to an incorrect result

Fix overflow of ints and ensure appropriate values passed to checkScaleNonZero()

Reviewed-by: darcy, martin
2013-08-23 14:15:54 -07:00
Timothy Buktu
e3b61c033b 8022180: BigInteger Burnikel-Ziegler quotient and remainder calculation assumes quotient parameter is zero
Clear the quotient in divideAndRemainderBurnikelZiegler() if the divisor is larger than the dividend.

Reviewed-by: alanb, bpb
2013-08-12 16:21:10 -07:00
Brian Burkhalter
aafacb6fa6 8022094: BigDecimal/CompareToTests and BigInteger/CompareToTests are incorrect
Fail test if errors; fix test values; port BigDecimal version to BigInteger

Reviewed-by: smarks, alanb
2013-08-02 11:10:41 -07:00
Brian Burkhalter
4fe69c432f 8020641: Clean up some code style in recent BigInteger contributions
Some minor cleanup to adhere better to Java coding conventions.

Reviewed-by: darcy
2013-07-26 17:09:30 -07:00
Tim Buktu
d59c1fac00 8014319: Faster division of large integers
Implement Burnickel-Ziegler division algorithm in BigInteger

Reviewed-by: bpb, martin
2013-07-26 17:03:19 -07:00
Brian Burkhalter
9123d3fed3 6480539: BigDecimal.stripTrailingZeros() has no effect on zero itself ("0.0")
Make stripTrailingZeros() return BigDecimal.ZERO if the BigDecimal is numerically equal to zero.

Reviewed-by: darcy
2013-07-09 12:47:37 -07:00
Alan Eliasen
5a0793018c 4641897: Faster string conversion of large integers
Accelerate conversion to string by means of Schoenhage recursive base conversion.

Reviewed-by: bpb, alanb
2013-06-20 12:15:24 -07:00
Louis Wasserman
90aebf1cf9 7131192: BigInteger.doubleValue() is depressingly slow
In doubleValue() and floatValue() replace converting to String and parsing to Double or Float with direct conversion into IEEE 754 bits.

Reviewed-by: bpb, drchase, martin
2013-06-21 11:50:45 -07:00
Alan Eliasen
3a76795991 4837946: Faster multiplication and exponentiation of large integers
4646474: BigInteger.pow() algorithm slow in 1.4.0

Implement Karatsuba and 3-way Toom-Cook multiplication as well as exponentiation using Karatsuba and Toom-Cook squaring.

Reviewed-by: alanb, bpb, martin
2013-06-19 08:59:39 -07:00
David Katleman
306cab1006 8004982: JDK8 source with GPL header errors
Reviewed-by: ohair
2012-12-20 16:24:50 -08:00
Joe Darcy
30d2b45bd8 6879143: java.math.BigInteger misses the xxxValueExact methods
Reviewed-by: alanb
2011-09-14 11:32:11 -07:00
Sergey Kuksenko
238bb5d3bb 7082971: More performance tuning of BigDecimal and other java.math classes
Reviewed-by: darcy
2011-09-01 23:00:09 -07:00
Lana Steuck
b99716e22a Merge 2011-04-17 16:19:29 -07:00
Sergey Kuksenko
c930bfc387 7036582: Improve test coverage of java.math.BigDecimal
Reviewed-by: darcy
2011-04-17 13:49:33 +01:00
Kelly O'Hair
d2b1e20c7d 7033660: Update copyright year to 2011 on any files changed in 2011
Reviewed-by: dholmes
2011-04-06 22:06:11 -07:00
Stuart Marks
dd0e38d73a 7021209: convert lang, math, util to use try-with-resources
Reviewed-by: alanb, darcy, naoto
2011-02-22 15:34:17 -08:00
Kelly O'Hair
fe008ae27a 6943119: Rebrand source copyright notices
Reviewed-by: darcy, weijun
2010-05-25 15:58:33 -07:00
Joe Darcy
b4b4646850 6908541: Bad resource management in java/math/BigInteger/BigIntegerTest.java
Reviewed-by: alanb
2009-12-22 21:48:19 -08:00
Joe Darcy
c40412f4f4 6907177: Update jdk tests to remove unncessary -source and -target options
Reviewed-by: ohair
2009-12-03 18:19:10 -08:00
Joe Darcy
589f5d20cb 6371401: java.math.BigInteger.shift(Integer.MIN_VALUE) throws StackOverflowError
Reviewed-by: alanb
2009-10-20 09:51:28 -07:00
Xiaobin Lu
4b58ee1a37 6876282: BigDecimal's divide(BigDecimal bd, RoundingFormat r) produces incorrect result
Reviewed-by: darcy
2009-08-27 18:00:16 -07:00
Xiaobin Lu
c0146a5bd0 6850606: Regression from JDK 1.6.0_12
The returned result from multiply should be constructed by using valueOf to take care of the INFLATED case.

Reviewed-by: darcy
2009-06-20 13:34:06 -07:00
Xiaobin Lu
2af45eb571 6806261: BigDecimal.longValueExact() method throws NullPointerException
Add various tests to test the change to 6622432

Reviewed-by: darcy
2009-05-24 16:35:32 -07:00
Xiaobin Lu
9f9d70b270 6622432: RFE: Performance improvements to java.math.BigDecimal
Reviewed-by: darcy
2009-05-24 16:29:57 -07:00
Joe Darcy
61f89b0025 6601457: Move wrapper class tests from closed to open
6601458: Move java.math tests from closed to open
6740185: Move java/lang/annotations tests to open
6759433: Move Math and StrictMath regression tests from closed to open

Move some more regression tests to the open

Reviewed-by: jjg
2009-01-26 19:49:26 -08:00