|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.singularsys.jep.functions.PostfixMathCommand com.singularsys.jep.functions.UnaryFunction com.singularsys.jep.functions.SquareRoot
public class SquareRoot
Square root function. Positive Number arguments returns double results. Negative Number arguments return Complex results by default or Double.NaN if the strict flag is set in constructor. Complex arguments return Complex results.
Field Summary |
---|
Fields inherited from class com.singularsys.jep.functions.PostfixMathCommand |
---|
curNumberOfParameters, name, NaN, numberOfParameters |
Constructor Summary | |
---|---|
SquareRoot()
Standard constructor, Complex results for negative Number arguments. |
|
SquareRoot(boolean strict)
If strict is true then returns NaN for negative real arguments. |
Method Summary | |
---|---|
java.lang.Object |
eval(java.lang.Object arg)
|
double |
evaluate(double val)
|
java.lang.Object |
sqrt(java.lang.Object param)
Calculates the square root of the parameter. |
Methods inherited from class com.singularsys.jep.functions.UnaryFunction |
---|
run |
Methods inherited from class com.singularsys.jep.functions.PostfixMathCommand |
---|
asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, checkNumberOfParameters, checkStack, getName, getNumberOfParameters, setCurNumberOfParameters, setName, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SquareRoot()
public SquareRoot(boolean strict)
strict
- Method Detail |
---|
public java.lang.Object eval(java.lang.Object arg) throws EvaluationException
eval
in class UnaryFunction
EvaluationException
public java.lang.Object sqrt(java.lang.Object param) throws EvaluationException
EvaluationException
public double evaluate(double val)
evaluate
in interface RealUnaryFunction
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |