|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectch.javasoft.math.BigMath
public class BigMath
Similar to Math, but for big numbers such as
BigIntegerBigDecimalBigFraction
| Constructor Summary | |
|---|---|
BigMath()
|
|
| Method Summary | |
|---|---|
static BigDecimal |
pi(int scale)
Gauss-Legendre Algorithm to calculate pi upto roughly the given scale |
static double |
sqrt(BigDecimal num)
Babylonian square root method (Newton's method) to compute the square root of the given big decimal up to double precision. |
static BigDecimal |
sqrt(BigDecimal num,
int scale)
Babylonian square root method (Newton's method) to compute the square root of the given big decimal number up to roughly the given scale. |
static double |
sqrt(BigFraction num)
Babylonian square root method (Newton's method) to compute the square root of the given big fraction number up to double precision. |
static BigDecimal |
sqrt(BigFraction num,
int scale)
Babylonian square root method (Newton's method) to compute the square root of the given big fraction number up to roughly the given scale. |
static double |
sqrt(BigInteger num)
Babylonian square root method (Newton's method) to compute the square root of the given big integer up to double precision. |
static BigDecimal |
sqrt(BigInteger num,
int scale)
Babylonian square root method (Newton's method) to compute the square root of the given big integer up to roughly the given scale. |
static int |
sqrt(int num)
|
static long |
sqrt(long num)
|
static long |
sqrtBabylonian(long num)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BigMath()
| Method Detail |
|---|
public static BigDecimal pi(int scale)
scale - scale of the BigDecimal PI to be returned
public static long sqrtBabylonian(long num)
public static long sqrt(long num)
public static int sqrt(int num)
public static BigDecimal sqrt(BigDecimal num,
int scale)
scale - scale of the BigDecimal square root to be returned
public static BigDecimal sqrt(BigInteger num,
int scale)
scale - scale of the BigDecimal square root to be returned
public static BigDecimal sqrt(BigFraction num,
int scale)
scale - scale of the BigDecimal square root to be returned
public static double sqrt(BigDecimal num)
public static double sqrt(BigInteger num)
public static double sqrt(BigFraction num)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||