summaryrefslogtreecommitdiffstats
path: root/math
Commit message (Collapse)AuthorAgeFilesLines
* Fixing BigDecimal.stripLeadingZeroes on "0e100", as discovered by jtreg.Jesse Wilson2009-12-211-1/+1
| | | | Plus other jtreg test scrubbing.
* Rewrite NativeBN_twosCompFitsIntoBytes.Elliott Hughes2009-10-301-3/+3
| | | | | | | | | | | | | | valgrind complains about invalid 4-byte reads, caused by "case 8" in the BNInterface.c function I'm removing here, which assumed that if we're checking whether a BIGNUM fits in 8 bytes, it must require more than 4 bytes (and so accessing d[1] is acceptable). We can implement this in Java using the existing BigInteger.bitLength method (which may call down to native code, but that native code looks okay). Also remove a related commented-out method. Bugs: 2223213, 2225642
* Respond to impossible CloneNotSupportedExceptions with AssertionErrors.Jesse Wilson2009-10-161-1/+1
| | | | See bug 2183132.
* am 4b304284: am 7f51bfee: Merge change I86898f45 into eclairJesse Wilson2009-10-011-0/+3
|\ | | | | | | | | | | | | Merge commit '4b30428421d4ad93d9e6fc34bc0190a5097dc4a6' * commit '4b30428421d4ad93d9e6fc34bc0190a5097dc4a6': Fix BigInteger math bugs.
| * Fix BigInteger math bugs.Jesse Wilson2009-09-291-0/+3
| | | | | | | | | | This initializes the internal representation before doing left shifts. I'd originally missed this in the first Harmony update; change 20002.
* | Remove NativeBN_bn2twosComp.Elliott Hughes2009-09-101-6/+0
|/ | | | | | | | | | | | | | | | NativeBN_bn2twosComp doesn't do what it claims to: it's an exact copy of NativeBN_BN_bn2bin (observe which OpenSSL BN_ function it calls!), and -- from the OpenSSL documentation -- that function "converts the absolute value of [its argument] into big-endian form". OpenSSL doesn't actually sport any appropriate function to call here, but luckily this code isn't called anywhere, and so can be removed. (BigInteger.toByteArray -- the most likely caller of this code -- seems to do the right thing, using Java code to make a big-endian two's-complement byte[]. Likewise, the conversion from a big-endian two's-complement byte[] for the corresponding BigInteger constructor looks right too, using native code to twiddle the bits itself.)
* Updating math to Harmony r772995.Jesse Wilson2009-08-0412-583/+327
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notable changes: - lots of trailing whitespace and "@since Android 1.0" tags removed - shiftLeft(1) replaced with shiftLeftOneBit(). That case can be optimized more aggressively than the general case. The new method exists in BigInteger and calls through to a new method in BitLevel in the same way as Harmony. This is a squashed commit of the following: commit 3f071487bdb8fff0b4a71ce0219ee7e1e16369fb Merge: 4fda354 10640b6 Author: Jesse Wilson <jessewilson@google.com> Date: Tue Aug 4 12:02:25 2009 -0700 Merge branch 'math_772995' into math_dalvik Conflicts: libcore/math/.classpath libcore/math/build.xml libcore/math/src/main/java/java/math/BigDecimal.java libcore/math/src/main/java/java/math/BigInteger.java libcore/math/src/main/java/java/math/Division.java libcore/math/src/main/java/java/math/Elementary.java libcore/math/src/main/java/java/math/Logical.java libcore/math/src/main/java/java/math/MathContext.java libcore/math/src/main/java/java/math/Multiplication.java libcore/math/src/main/java/java/math/Primality.java libcore/math/src/main/java/java/math/RoundingMode.java libcore/math/src/test/java/tests/api/java/math/BigDecimalTest.java libcore/math/src/test/java/tests/api/java/math/BigIntegerTest.java commit 4fda354bd7d2c0ee918c86fa89852310cc8f2af7 Author: Jesse Wilson <jessewilson@google.com> Date: Wed Jul 29 17:12:27 2009 -0700 Dalvik Math commit 10640b6b254200f1c89553072e50137f6ad46c84 Author: Jesse Wilson <jessewilson@google.com> Date: Wed Jul 29 17:11:07 2009 -0700 Math 772995 commit 15302f6d09b3547f1018e3d228f233f8f72c7de9 Author: Jesse Wilson <jessewilson@google.com> Date: Wed Jul 29 17:08:19 2009 -0700 Math 527399
* AI 148447: Marking some more tests as broken, because theyJorg Pleumann2009-05-071-0/+2
| | | | | | | | don't work properly in the CTS environment for some reason. BUG=1285921 Automated import of CL 148447
* auto import from //branches/cupcake/...@137873The Android Open Source Project2009-03-114-18/+6
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-0342-0/+29270
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-0342-29270/+0
|
* auto import from //branches/cupcake/...@130745The Android Open Source Project2009-02-103-7/+3
|
* auto import from //branches/cupcake/...@125939The Android Open Source Project2009-01-0928-8014/+7487
|
* Code drop from //branches/cupcake/...@124589The Android Open Source Project2008-12-1737-994/+8522
|
* Initial ContributionThe Android Open Source Project2008-10-2139-0/+22273