meval-rs icon indicating copy to clipboard operation
meval-rs copied to clipboard

Complex numbers

Open abagshaw opened this issue 5 years ago • 2 comments

Any plans to support complex numbers?

abagshaw avatar Mar 25 '19 22:03 abagshaw

Thanks for bringing it up. I do not have any plans besides supporting f64/f32 types. My goal for this crate is to be as easy as possible to use, and the (not so well thought out) design has been driven by my use in numerical computations. I am not against it, so I welcome pull requests adding complex numbers support as long as they do not make the library more difficult to use. I am guessing that a simple use of generics and the num-traits crate for trait bounds (Float) might do the trick.

rekka avatar Mar 29 '19 03:03 rekka

Sounds good, yeah complex number support isn't something I need right now but maybe down the road I'll get around to implementing it and open a PR.

abagshaw avatar Mar 29 '19 03:03 abagshaw