Exun.Simpl (exun v0.5.2)

Simplify expressions

Link to this section Summary

Functions

Extract common factors from mult

Change power sign of AST (expon * -1 or 1/tree)

Change sign of AST

Reduce literals to one 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]}

Normalize some structs, mainly {{:m,op},l} so signs can be comparables

For convenience, creates ast {{:m,:mult},[a,-b]}

Returns normalized sign of ast

For convenience, creates ast {{:m,:suma},[a,b]}

Link to this section Functions

Link to this function

add_opand(atom, a, arg3)

Extract common factors from mult

Change power sign of AST (expon * -1 or 1/tree)

Change sign of AST

Link to this function

collect_literals(arg)

Reduce literals to one 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]}

Normalize some structs, mainly {{:m,op},l} so signs can be comparables

For convenience, creates ast {{:m,:mult},[a,-b]}

Returns normalized sign of ast

Link to this function

subst(op, pivot, opand)

For convenience, creates ast {{:m,:suma},[a,b]}