|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.shiftone.bigcalc.core.function.AbstractNoArgumentFunction org.shiftone.bigcalc.math.function.BigPiCalculator
Pi = 16 * arctan(1/5) + 4 * arctan(1/239) arctan(x) = x - x^3/3 + x^5/5 - x^7/7 + x^9/9 - x^11/11 ...
Field Summary |
Fields inherited from interface org.shiftone.bigcalc.math.MathConstants |
BD_239, FIVE, FOUR, I_TWO, ONE, TWO, ZERO |
Constructor Summary | |
BigPiCalculator()
|
Method Summary | |
java.lang.Object |
evaluate(Context context)
|
static java.math.BigDecimal |
pi(int scale)
pi/4 = 4*arctan(1/5) - arctan(1/239) |
void |
print(java.lang.StringBuffer sb,
Context context)
|
Methods inherited from class org.shiftone.bigcalc.core.function.AbstractNoArgumentFunction |
setArguments |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.shiftone.bigcalc.Function |
setArguments |
Constructor Detail |
public BigPiCalculator()
Method Detail |
public java.lang.Object evaluate(Context context) throws java.lang.Exception
evaluate
in interface Functor
java.lang.Exception
public static java.math.BigDecimal pi(int scale)
scale
-
public void print(java.lang.StringBuffer sb, Context context) throws java.lang.Exception
print
in interface Functor
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |