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
,java.io.Serializable
public class NaturalLogarithm extends UnaryFunction implements RealUnaryFunction
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:
StrictNaturalLogarithm
, Serialized Form
-
-
Field Summary
-
Fields inherited from class com.singularsys.jep.functions.PostfixMathCommand
curNumberOfParameters, name, NaN, numberOfParameters
-
-
Constructor Summary
Constructors Constructor Description NaturalLogarithm()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
eval(java.lang.Object arg)
double
evaluate(double val)
java.lang.Object
ln(java.lang.Object param)
-
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
-
-
-
-
Method Detail
-
eval
public java.lang.Object eval(java.lang.Object arg) throws EvaluationException
- Specified by:
eval
in classUnaryFunction
- Throws:
EvaluationException
-
ln
public java.lang.Object ln(java.lang.Object param) throws EvaluationException
- Throws:
EvaluationException
-
evaluate
public double evaluate(double val)
- Specified by:
evaluate
in interfaceRealUnaryFunction
-
-