Package java.math

Examples of java.math.BigInteger


        print("Object", new Object());
        print("Timestamp", new java.sql.Timestamp(0));
        print("Date", new java.sql.Date(0));
        print("Time", new java.sql.Time(0));
        print("BigDecimal", new BigDecimal("0"));
        print("BigInteger", new BigInteger("0"));
        print("String", new String("Hello"));
        print("Data", Data.create(null, 10));
        print("Row", new Row(new Value[0], 0));
        System.out.println();
        for (int i = 1; i < 128; i += i) {
View Full Code Here


    }

    private void test(int type, long minValue, long maxValue) {
        values = New.arrayList();
        this.dataType = type;
        this.min = new BigInteger("" + minValue);
        this.max = new BigInteger("" + maxValue);
        add(0);
        add(minValue);
        add(maxValue);
        add(maxValue - 1);
        add(minValue + 1);
View Full Code Here

            fail();
        }
    }

    private void testValues(Value va, Value vb) {
        BigInteger a = new BigInteger(va.getString());
        BigInteger b = new BigInteger(vb.getString());
        successExpected = inRange(a.negate());
        try {
            checkIfExpected(va.negate().getString(), a.negate().toString());
            onSuccess();
        } catch (Exception e) {
View Full Code Here

    @Test public void testConvertStringLong1() throws Exception {
        helpConvert("5", "long", new Long(5)); //$NON-NLS-1$ //$NON-NLS-2$
    }

    @Test public void testConvertStringBigInteger1() throws Exception {
        helpConvert("5", "biginteger", new BigInteger("5")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    }
View Full Code Here

        helpConvert("5", "biginteger", new BigInteger("5")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    }

    @Test public void testConvertStringBigInteger2() throws Exception {
        String bigInt = "" + Integer.MAX_VALUE + "111"; //$NON-NLS-1$ //$NON-NLS-2$
        helpConvert(bigInt, "biginteger", new BigInteger(bigInt)); //$NON-NLS-1$
    }
View Full Code Here

    @Test public void testConvertStringBigDecimal1() throws Exception {
        helpConvert("5.2", "bigdecimal", new BigDecimal("5.2")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    }

    @Test public void testConvertDoubleBigInteger() throws Exception {
        helpConvert(new Double(1.0d), "biginteger", new BigInteger("1")); //$NON-NLS-1$ //$NON-NLS-2$
    }
View Full Code Here

    @Test public void testConvertDoubleBigInteger() throws Exception {
        helpConvert(new Double(1.0d), "biginteger", new BigInteger("1")); //$NON-NLS-1$ //$NON-NLS-2$
    }

    @Test public void testConvertFloatBigInteger() throws Exception {
        helpConvert(new Float(1.0), "biginteger", new BigInteger("1")); //$NON-NLS-1$ //$NON-NLS-2$
    }
View Full Code Here

    @Test public void testConvertFloatBigInteger() throws Exception {
        helpConvert(new Float(1.0), "biginteger", new BigInteger("1")); //$NON-NLS-1$ //$NON-NLS-2$
    }

    @Test public void testConvertBigDecimalBigInteger() throws Exception {
        helpConvert(new BigDecimal("1.0"), "biginteger", new BigInteger("1")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    }
View Full Code Here

    @Test public void testMod3() {
        assertEquals(-40, FunctionMethods.mod(-340, -60), 0);
    }
   
    @Test public void testMod4() {
        assertEquals(new BigInteger("-1"), FunctionMethods.mod(new BigInteger("-3"), new BigInteger("2")));   //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    }
View Full Code Here

    @Test public void testMod4() {
        assertEquals(new BigInteger("-1"), FunctionMethods.mod(new BigInteger("-3"), new BigInteger("2")));   //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    }
   
    @Test public void testMod5() {
        assertEquals(new BigInteger("-1"), FunctionMethods.mod(new BigInteger("-3"), new BigInteger("-2")));   //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    }
View Full Code Here

TOP

Related Classes of java.math.BigInteger

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.