Exun.Simpl (exun v0.5.1)
Simplify expressions
Link to this section Summary
Functions
Change power sign of AST (expon * -1 or 1/tree)
Change sign of AST
Reduce literals to une unit or one constant if possible
For convenience, creates ast {{:m,:mult},[a,b^-1]}
For convenience, creates ast {:elev,a,b}
Try to keep at least 3 decimals of precission
Recursively try to simplify expression. Multiple tries are performed. For a more agressive simplify, use Exun.Collect.coll
For convenience, creates ast {{:m,:mult},[a,b]}
For convenience, creates ast {{:m,:mult},[a,-b]}
For convenience, creates ast {{:m,:suma},[a,b]}
Link to this section Functions
chpow(ast)
Change power sign of AST (expon * -1 or 1/tree)
chsign(ast)
Change sign of AST
collect_literals(arg)
Reduce literals to une unit or one constant if possible
divi(a, b)
For convenience, creates ast {{:m,:mult},[a,b^-1]}
elev(a, b)
For convenience, creates ast {:elev,a,b}
exp(a, b)
isolate(arg)
ln(a)
minus(a)
mk(ast)
mknum(n, d)
Try to keep at least 3 decimals of precission
mkrec(ast)
Recursively try to simplify expression. Multiple tries are performed. For a more agressive simplify, use Exun.Collect.coll
mult(a, b)
For convenience, creates ast {{:m,:mult},[a,b]}
rest(a, b)
For convenience, creates ast {{:m,:mult},[a,-b]}
suma(a, b)
For convenience, creates ast {{:m,:suma},[a,b]}