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

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

Change sign of AST

Link to this function

collect_literals(arg)

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]}