Open likebike opened 4 years ago
I'm curious what's the general idea on how to approach adding these new modes. Would all/some of these number types be supported within a single calculation? Or would this be more of an either or situation, being able to specify one of these for all numbers within a single calculation, or perhaps even on crate level with compile-time features?
Great questions. I really haven't figured out the right way to do this yet, but I was imagining that I would have a special syntax in the expressions to represent the Complex/Rational numbers. Then I would probably have a compile-time setting (maybe a generic structure like Evaler<f64>
Evaler<f32>
Evaler<BigInt>
..., or maybe a crate feature for conditional compilation) for the different types.
There was another crate out there that had a nice expression syntax for the Rational and Complex stuff, but I can't remember which one it was at the moment. I'll find it...
I should also mention that my top priority for this project is to maintain high performance. I will try my best to expand the capabilities to handle more advanced mathematical situations, but if I ever need to choose between mathematical perfection and performance, I'm going to choose performance. There are many other projects that already do the math stuff way better than I can ever do, so this project will focus completely on what it does better than anything else: performance. ...otherwise, there's no point for this project to exist.
I'd like to do something similar, but with ndarray types.
Any news on supporting f32
?
Right now,
fasteval
only supports f64. I'd also like to support these other modes:Any others?