public class Log extends AbstractArg12 implements INumeric, LogRules
Constructor and Description |
---|
Log() |
Modifier and Type | Method and Description |
---|---|
static IExpr |
baseBLog(IInteger b,
IInteger arg)
Integer logarithm of
arg for base b . |
IExpr |
e1DblArg(INum arg1) |
IExpr |
e1DblComArg(IComplexNum arg1) |
IExpr |
e1ObjArg(IExpr expr) |
IExpr |
e2DblArg(INum arg1,
INum arg2) |
IExpr |
e2IntArg(IInteger arg1,
IInteger arg2) |
double |
evalReal(double[] stack,
int top,
int size)
Evaluate the function to a double number
|
static BinaryFunctorImpl<IExpr> |
getFunction() |
IAST |
getRuleAST()
{ Log[1]=0, Log[E]=1, Log[E^(x_Integer)]:=x, Log[E^(x_Rational)]:=x, Log[E^(I)]=I, Log[Exp[-I]]=(-I),
Log[0]=(-Infinity) }
|
void |
setUp(ISymbol symbol)
Evaluate built-in rules and define Attributes for a function.
|
binaryOperator, e1ApcomplexArg, e1ApfloatArg, e1ComArg, e1FraArg, e1FunArg, e1IntArg, e1SymArg, e2ApcomplexArg, e2ApfloatArg, e2ComArg, e2DblComArg, e2FraArg, e2FunArg, e2ObjArg, e2SymArg, eComFraArg, eComIntArg, eFunIntArg, evaluate, unaryOperator
createRuleFromMethod, getNormalizedNegativeExpression, getNormalizedNegativeExpression, getPeriodicParts, getPureImaginaryPart, initSerializedRules, isNegativeExpression
numericEval
public IAST getRuleAST()
{ Log[1]=0, Log[E]=1, Log[E^(x_Integer)]:=x, Log[E^(x_Rational)]:=x, Log[E^(I)]=I, Log[Exp[-I]]=(-I), Log[0]=(-Infinity) }
getRuleAST
in class AbstractFunctionEvaluator
null
if no rules are definedpublic IExpr e1DblArg(INum arg1)
e1DblArg
in class AbstractArg12
public IExpr e1DblComArg(IComplexNum arg1)
e1DblComArg
in class AbstractArg12
public IExpr e2DblArg(INum arg1, INum arg2)
e2DblArg
in class AbstractArg12
public IExpr e2IntArg(IInteger arg1, IInteger arg2)
e2IntArg
in class AbstractArg12
public static IExpr baseBLog(IInteger b, IInteger arg)
arg
for base b
. Gives Log
b(arg) or Log(arg)/Log(b)
.b
- the base of the logarithmarg
- public static BinaryFunctorImpl<IExpr> getFunction()
public double evalReal(double[] stack, int top, int size)
INumeric
evalReal
in interface INumeric
DoubleStackEvaluator
public void setUp(ISymbol symbol) throws SyntaxError
AbstractFunctionEvaluator
setUp
in interface IEvaluator
setUp
in class AbstractFunctionEvaluator
symbol
- the symbol which should be set upSyntaxError
public IExpr e1ObjArg(IExpr expr)
e1ObjArg
in class AbstractArg12