bertiqwerty / exmex

Math parser and evaluator in Rust, capable of partial differentiation, allows the use of custom operators.
Apache License 2.0
39 stars 6 forks source link

Unify logic of flatex evaluation #43

Closed terrorfisch closed 2 years ago

terrorfisch commented 2 years ago

I refactored the FlatEx evaluation code a bit to separate the logic from the ignored number tracking to make changes to the operation implementation like #41 easier.

This should not impact performance of expressions with less then usize::BITS nodes. Large expressions could get a bit faster because I implemented a simple bit vector logic for [usize] instead of using [bool]. I wrote rather extensive tests to make shure this works correctly. I did not conduct clean performance benchmarks yet.