Hey Matt! Once again thanks for your work on this incredible library.
From my perspective, the greatest inhibitor for this library at the moment is the lack of operations that can be included in a context/tape. I understand that some operations are purposefully excluded to keep complexity down and performance up, but the ones that I think would be most helpful are trig functions and modulo (if there's a way to fake modulo with min and div I couldn't find it).
I've written a naive implementation of sin/cos in a fork. I haven't written any test suites for them, I skipped out on the interval stuff (set it to [-1, 1] for now), and left the JIT implementation alone with a todo! since I can't write the assembly. For these reasons I decided not to make a PR, but the rest is implemented and the math is correct as far as I can tell. Honestly it's above me to make this level of modifications and I'm not sure how I managed to succeed, but it works. If you use this work I'd recommend thoroughly double-checking everything.
Anyways I just wanted to offer this in case you did plan on implementing trig functions at some point. Hope you're well!
Hey Matt! Once again thanks for your work on this incredible library.
From my perspective, the greatest inhibitor for this library at the moment is the lack of operations that can be included in a context/tape. I understand that some operations are purposefully excluded to keep complexity down and performance up, but the ones that I think would be most helpful are trig functions and modulo (if there's a way to fake modulo with
minanddivI couldn't find it).I've written a naive implementation of
sin/cosin a fork. I haven't written any test suites for them, I skipped out on the interval stuff (set it to[-1, 1]for now), and left the JIT implementation alone with atodo!since I can't write the assembly. For these reasons I decided not to make a PR, but the rest is implemented and the math is correct as far as I can tell. Honestly it's above me to make this level of modifications and I'm not sure how I managed to succeed, but it works. If you use this work I'd recommend thoroughly double-checking everything.Anyways I just wanted to offer this in case you did plan on implementing trig functions at some point. Hope you're well!