20 Commits

Author SHA1 Message Date
Brian Burkhalter
e5a6f24f64 8032027: Add BigInteger square root methods
Add sqrt() and sqrtAndReminder() using Newton iteration

Reviewed-by: darcy, lowasser
2015-12-10 17:47:26 -08:00
Chris Hegarty
008fee0591 8079782: RandomFactory should be in the jdk.testlibrary package
Reviewed-by: bpb
2015-05-08 11:02:33 +01:00
Brian Burkhalter
30e8183ee8 8078672: Print and allow setting by Java property seeds used to initialize Random instances in java.lang numerics tests
Add ability to initial the random number generator from the system property "seed" and print to STDOUT the seed value actually used.

Reviewed-by: darcy
2015-04-29 16:34:49 -07:00
Joe Darcy
86c109e149 8078334: Mark regression tests using randomness
Reviewed-by: xuelei, alanb
2015-04-29 10:25:53 -07:00
Brian Burkhalter
f9a9e68c05 8074460: Always print seeds used in [Splittable]Random instances in java.math tests
Create a utility class which creates a pseudorandom number generator (PRNG) and retains the seed. Use this class in java.math tests which use a PRNG. Always print the seed value before the PRNG is used.

Reviewed-by: darcy
2015-03-06 16:00:58 -08:00
Brian Burkhalter
4417397e26 4026465: Provide more byte array constructors for BigInteger
Add two's complement and sign-magnitude constructors for byte arrays with offset and length.

Reviewed-by: darcy, alanb, scolebourne
2015-01-09 17:27:28 -08:00
Brian Burkhalter
6d148f368d 8058679: More bad characters in BigIntegerTest
Remove remaining non-US-ASCII characters

Reviewed-by: alanb
2014-09-17 14:11:40 -07:00
Brian Burkhalter
0c71a5e8f4 8058664: Bad fonts in BigIntegerTest
Replace bad fonts with spaces.

Reviewed-by: alanb
2014-09-17 11:04:16 -07:00
Robert Gibson
8acf66df11 8058505: BigIntegerTest does not exercise Burnikel-Ziegler division
Modify divideLarge() method such that the w/z division exercises the B-Z branch.

Reviewed-by: darcy
2014-09-15 13:25:08 -07:00
Brian Burkhalter
9fab2b1e9a 8029514: java/math/BigInteger/BigIntegerTest.java failing since thresholds adjusted in 8022181
Ensure the value returned by getLower() is unsigned.

Reviewed-by: darcy
2013-12-05 07:44:59 -08: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
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
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
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
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
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