Exun.Collect (exun v0.2.0)

Collect Math expression, try to simplify

Link to this section Summary

Functions

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

Change sign of AST

Main collecting function. Try to simplify tree without chaging its value Gets and returns an AST, as produced by Exun.parse.

Denormalize tree, reverse of norm

Normalize tree so :mult and :suma are converted to list: {:mult,{:mult,a,b},c} -> {{:m,:mult},[a,b,c]}

Link to this section Functions

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

Change sign of AST

Main collecting function. Try to simplify tree without chaging its value Gets and returns an AST, as produced by Exun.parse.

Denormalize tree, reverse of norm

Normalize tree so :mult and :suma are converted to list: {:mult,{:mult,a,b},c} -> {{:m,:mult},[a,b,c]}