Package com.singularsys.jep.functions
Class NaturalLogarithm
java.lang.Object
com.singularsys.jep.functions.PostfixMathCommand
com.singularsys.jep.functions.UnaryFunction
com.singularsys.jep.functions.NaturalLogarithm
- All Implemented Interfaces:
PostfixMathCommandI
,RealUnaryFunction
,Serializable
Natural logarithm.
For positive Double arguments returns a Double: Math.log(value).
For negative Double arguments convert to Complex and return the Complex log: Complex(Math.log(Math.abs(value)),Math.PI)
For Complex find the complex logarithm: Complex(Math.log(Math.abs(value)),arg(value))
- See Also:
-
Field Summary
Fields inherited from class com.singularsys.jep.functions.PostfixMathCommand
curNumberOfParameters, name, NaN, numberOfParameters
-
Constructor Summary
-
Method Summary
Methods inherited from class com.singularsys.jep.functions.UnaryFunction
instanceOf, instanceOf, run
Methods inherited from class com.singularsys.jep.functions.PostfixMathCommand
asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, checkNumberOfParameters, getName, getNumberOfParameters, setCurNumberOfParameters, setName, toString, toString
-
Constructor Details
-
NaturalLogarithm
public NaturalLogarithm()
-
-
Method Details
-
eval
Description copied from class:UnaryFunction
Evaluate the function- Specified by:
eval
in classUnaryFunction
- Parameters:
arg
- the single argument passed in- Returns:
- the result of the function
- Throws:
EvaluationException
-
ln
- Throws:
EvaluationException
-
evaluate
public double evaluate(double val) - Specified by:
evaluate
in interfaceRealUnaryFunction
-