Java Code Examples for sun.misc.FDBigInteger#cmp()
The following examples show how to use
sun.misc.FDBigInteger#cmp() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestFDBigInteger.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
private static void testCmp(FDBigInteger t, FDBigInteger o) throws Exception { BigInteger bt = t.toBigInteger(); BigInteger bo = o.toBigInteger(); int cmp = t.cmp(o); int bcmp = bt.compareTo(bo); if (bcmp != cmp) { throw new Exception("cmp returns " + cmp + " expected " + bcmp); } check(bt, t, "cmp corrupts this"); check(bo, o, "cmp corrupts other"); if (o.cmp(t) != -cmp) { throw new Exception("asymmetrical cmp"); } check(bt, t, "cmp corrupts this"); check(bo, o, "cmp corrupts other"); }
Example 2
Source File: TestFDBigInteger.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
private static void testCmp(FDBigInteger t, FDBigInteger o) throws Exception { BigInteger bt = t.toBigInteger(); BigInteger bo = o.toBigInteger(); int cmp = t.cmp(o); int bcmp = bt.compareTo(bo); if (bcmp != cmp) { throw new Exception("cmp returns " + cmp + " expected " + bcmp); } check(bt, t, "cmp corrupts this"); check(bo, o, "cmp corrupts other"); if (o.cmp(t) != -cmp) { throw new Exception("asymmetrical cmp"); } check(bt, t, "cmp corrupts this"); check(bo, o, "cmp corrupts other"); }
Example 3
Source File: TestFDBigInteger.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
private static void testCmp(FDBigInteger t, FDBigInteger o) throws Exception { BigInteger bt = t.toBigInteger(); BigInteger bo = o.toBigInteger(); int cmp = t.cmp(o); int bcmp = bt.compareTo(bo); if (bcmp != cmp) { throw new Exception("cmp returns " + cmp + " expected " + bcmp); } check(bt, t, "cmp corrupts this"); check(bo, o, "cmp corrupts other"); if (o.cmp(t) != -cmp) { throw new Exception("asymmetrical cmp"); } check(bt, t, "cmp corrupts this"); check(bo, o, "cmp corrupts other"); }
Example 4
Source File: TestFDBigInteger.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
private static void testCmp(FDBigInteger t, FDBigInteger o) throws Exception { BigInteger bt = t.toBigInteger(); BigInteger bo = o.toBigInteger(); int cmp = t.cmp(o); int bcmp = bt.compareTo(bo); if (bcmp != cmp) { throw new Exception("cmp returns " + cmp + " expected " + bcmp); } check(bt, t, "cmp corrupts this"); check(bo, o, "cmp corrupts other"); if (o.cmp(t) != -cmp) { throw new Exception("asymmetrical cmp"); } check(bt, t, "cmp corrupts this"); check(bo, o, "cmp corrupts other"); }
Example 5
Source File: TestFDBigInteger.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
private static void testCmp(FDBigInteger t, FDBigInteger o) throws Exception { BigInteger bt = t.toBigInteger(); BigInteger bo = o.toBigInteger(); int cmp = t.cmp(o); int bcmp = bt.compareTo(bo); if (bcmp != cmp) { throw new Exception("cmp returns " + cmp + " expected " + bcmp); } check(bt, t, "cmp corrupts this"); check(bo, o, "cmp corrupts other"); if (o.cmp(t) != -cmp) { throw new Exception("asymmetrical cmp"); } check(bt, t, "cmp corrupts this"); check(bo, o, "cmp corrupts other"); }
Example 6
Source File: TestFDBigInteger.java From hottub with GNU General Public License v2.0 | 6 votes |
private static void testCmp(FDBigInteger t, FDBigInteger o) throws Exception { BigInteger bt = t.toBigInteger(); BigInteger bo = o.toBigInteger(); int cmp = t.cmp(o); int bcmp = bt.compareTo(bo); if (bcmp != cmp) { throw new Exception("cmp returns " + cmp + " expected " + bcmp); } check(bt, t, "cmp corrupts this"); check(bo, o, "cmp corrupts other"); if (o.cmp(t) != -cmp) { throw new Exception("asymmetrical cmp"); } check(bt, t, "cmp corrupts this"); check(bo, o, "cmp corrupts other"); }
Example 7
Source File: TestFDBigInteger.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
private static void testCmp(FDBigInteger t, FDBigInteger o) throws Exception { BigInteger bt = t.toBigInteger(); BigInteger bo = o.toBigInteger(); int cmp = t.cmp(o); int bcmp = bt.compareTo(bo); if (bcmp != cmp) { throw new Exception("cmp returns " + cmp + " expected " + bcmp); } check(bt, t, "cmp corrupts this"); check(bo, o, "cmp corrupts other"); if (o.cmp(t) != -cmp) { throw new Exception("asymmetrical cmp"); } check(bt, t, "cmp corrupts this"); check(bo, o, "cmp corrupts other"); }
Example 8
Source File: TestFDBigInteger.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
private static void testCmp(FDBigInteger t, FDBigInteger o) throws Exception { BigInteger bt = t.toBigInteger(); BigInteger bo = o.toBigInteger(); int cmp = t.cmp(o); int bcmp = bt.compareTo(bo); if (bcmp != cmp) { throw new Exception("cmp returns " + cmp + " expected " + bcmp); } check(bt, t, "cmp corrupts this"); check(bo, o, "cmp corrupts other"); if (o.cmp(t) != -cmp) { throw new Exception("asymmetrical cmp"); } check(bt, t, "cmp corrupts this"); check(bo, o, "cmp corrupts other"); }
Example 9
Source File: TestFDBigInteger.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
private static void testCmp(FDBigInteger t, FDBigInteger o) throws Exception { BigInteger bt = t.toBigInteger(); BigInteger bo = o.toBigInteger(); int cmp = t.cmp(o); int bcmp = bt.compareTo(bo); if (bcmp != cmp) { throw new Exception("cmp returns " + cmp + " expected " + bcmp); } check(bt, t, "cmp corrupts this"); check(bo, o, "cmp corrupts other"); if (o.cmp(t) != -cmp) { throw new Exception("asymmetrical cmp"); } check(bt, t, "cmp corrupts this"); check(bo, o, "cmp corrupts other"); }
Example 10
Source File: TestFDBigInteger.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
private static void testCmp(FDBigInteger t, FDBigInteger o) throws Exception { BigInteger bt = t.toBigInteger(); BigInteger bo = o.toBigInteger(); int cmp = t.cmp(o); int bcmp = bt.compareTo(bo); if (bcmp != cmp) { throw new Exception("cmp returns " + cmp + " expected " + bcmp); } check(bt, t, "cmp corrupts this"); check(bo, o, "cmp corrupts other"); if (o.cmp(t) != -cmp) { throw new Exception("asymmetrical cmp"); } check(bt, t, "cmp corrupts this"); check(bo, o, "cmp corrupts other"); }
Example 11
Source File: TestFDBigInteger.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
private static void testCmpPow52(FDBigInteger t, int p5, int p2) throws Exception { FDBigInteger o = FDBigInteger.valueOfPow52(p5, p2); BigInteger bt = t.toBigInteger(); BigInteger bo = biPow52(p5, p2); int cmp = t.cmp(o); int bcmp = bt.compareTo(bo); if (bcmp != cmp) { throw new Exception("cmpPow52 returns " + cmp + " expected " + bcmp); } check(bt, t, "cmpPow52 corrupts this"); check(bo, o, "cmpPow5 corrupts other"); }
Example 12
Source File: TestFDBigInteger.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
private static void testCmpPow52(FDBigInteger t, int p5, int p2) throws Exception { FDBigInteger o = FDBigInteger.valueOfPow52(p5, p2); BigInteger bt = t.toBigInteger(); BigInteger bo = biPow52(p5, p2); int cmp = t.cmp(o); int bcmp = bt.compareTo(bo); if (bcmp != cmp) { throw new Exception("cmpPow52 returns " + cmp + " expected " + bcmp); } check(bt, t, "cmpPow52 corrupts this"); check(bo, o, "cmpPow5 corrupts other"); }
Example 13
Source File: TestFDBigInteger.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
private static void testCmpPow52(FDBigInteger t, int p5, int p2) throws Exception { FDBigInteger o = FDBigInteger.valueOfPow52(p5, p2); BigInteger bt = t.toBigInteger(); BigInteger bo = biPow52(p5, p2); int cmp = t.cmp(o); int bcmp = bt.compareTo(bo); if (bcmp != cmp) { throw new Exception("cmpPow52 returns " + cmp + " expected " + bcmp); } check(bt, t, "cmpPow52 corrupts this"); check(bo, o, "cmpPow5 corrupts other"); }
Example 14
Source File: TestFDBigInteger.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
private static void testCmpPow52(FDBigInteger t, int p5, int p2) throws Exception { FDBigInteger o = FDBigInteger.valueOfPow52(p5, p2); BigInteger bt = t.toBigInteger(); BigInteger bo = biPow52(p5, p2); int cmp = t.cmp(o); int bcmp = bt.compareTo(bo); if (bcmp != cmp) { throw new Exception("cmpPow52 returns " + cmp + " expected " + bcmp); } check(bt, t, "cmpPow52 corrupts this"); check(bo, o, "cmpPow5 corrupts other"); }
Example 15
Source File: TestFDBigInteger.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
private static void testCmpPow52(FDBigInteger t, int p5, int p2) throws Exception { FDBigInteger o = FDBigInteger.valueOfPow52(p5, p2); BigInteger bt = t.toBigInteger(); BigInteger bo = biPow52(p5, p2); int cmp = t.cmp(o); int bcmp = bt.compareTo(bo); if (bcmp != cmp) { throw new Exception("cmpPow52 returns " + cmp + " expected " + bcmp); } check(bt, t, "cmpPow52 corrupts this"); check(bo, o, "cmpPow5 corrupts other"); }
Example 16
Source File: TestFDBigInteger.java From hottub with GNU General Public License v2.0 | 5 votes |
private static void testCmpPow52(FDBigInteger t, int p5, int p2) throws Exception { FDBigInteger o = FDBigInteger.valueOfPow52(p5, p2); BigInteger bt = t.toBigInteger(); BigInteger bo = biPow52(p5, p2); int cmp = t.cmp(o); int bcmp = bt.compareTo(bo); if (bcmp != cmp) { throw new Exception("cmpPow52 returns " + cmp + " expected " + bcmp); } check(bt, t, "cmpPow52 corrupts this"); check(bo, o, "cmpPow5 corrupts other"); }
Example 17
Source File: TestFDBigInteger.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
private static void testCmpPow52(FDBigInteger t, int p5, int p2) throws Exception { FDBigInteger o = FDBigInteger.valueOfPow52(p5, p2); BigInteger bt = t.toBigInteger(); BigInteger bo = biPow52(p5, p2); int cmp = t.cmp(o); int bcmp = bt.compareTo(bo); if (bcmp != cmp) { throw new Exception("cmpPow52 returns " + cmp + " expected " + bcmp); } check(bt, t, "cmpPow52 corrupts this"); check(bo, o, "cmpPow5 corrupts other"); }
Example 18
Source File: TestFDBigInteger.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
private static void testCmpPow52(FDBigInteger t, int p5, int p2) throws Exception { FDBigInteger o = FDBigInteger.valueOfPow52(p5, p2); BigInteger bt = t.toBigInteger(); BigInteger bo = biPow52(p5, p2); int cmp = t.cmp(o); int bcmp = bt.compareTo(bo); if (bcmp != cmp) { throw new Exception("cmpPow52 returns " + cmp + " expected " + bcmp); } check(bt, t, "cmpPow52 corrupts this"); check(bo, o, "cmpPow5 corrupts other"); }
Example 19
Source File: TestFDBigInteger.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
private static void testCmpPow52(FDBigInteger t, int p5, int p2) throws Exception { FDBigInteger o = FDBigInteger.valueOfPow52(p5, p2); BigInteger bt = t.toBigInteger(); BigInteger bo = biPow52(p5, p2); int cmp = t.cmp(o); int bcmp = bt.compareTo(bo); if (bcmp != cmp) { throw new Exception("cmpPow52 returns " + cmp + " expected " + bcmp); } check(bt, t, "cmpPow52 corrupts this"); check(bo, o, "cmpPow5 corrupts other"); }
Example 20
Source File: TestFDBigInteger.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
private static void testCmpPow52(FDBigInteger t, int p5, int p2) throws Exception { FDBigInteger o = FDBigInteger.valueOfPow52(p5, p2); BigInteger bt = t.toBigInteger(); BigInteger bo = biPow52(p5, p2); int cmp = t.cmp(o); int bcmp = bt.compareTo(bo); if (bcmp != cmp) { throw new Exception("cmpPow52 returns " + cmp + " expected " + bcmp); } check(bt, t, "cmpPow52 corrupts this"); check(bo, o, "cmpPow5 corrupts other"); }