Package org.jscience.mathematics.number

Examples of org.jscience.mathematics.number.Real


        {
            System.out.println("");
            System.out.println("Numbers");

            Real two = Real.valueOf(2); // 2.0000..00
            Real three = Real.valueOf(3);
            Real.setExactPrecision(100); // Assumes 100 exact digits for exact numbers.

            System.out.println("2/3       = " + two.divide(three));
            Real sqrt2 = two.sqrt();
            System.out.println("sqrt(2)   = " + sqrt2);
            System.out.println("Precision = " + sqrt2.getPrecision()
                    + " digits.");

            LargeInteger dividend = LargeInteger.valueOf("3133861182986538201");
            LargeInteger divisor = LargeInteger.valueOf("25147325102501733369");
            Rational rational = Rational.valueOf(dividend, divisor);
View Full Code Here

TOP

Related Classes of org.jscience.mathematics.number.Real

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.