-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any plan for trigonometric functions? #2
Comments
Hey @fxpineau. Yes, I think that I'll work on implementing them. I already implemented e and pi, and started reading on log and exp. The paper that you attached looks excellent. Btw, if you are interested in implementing something then that would be great. You can start with something small. I would love to review the pull request. |
I landed a quick implementation of sine(). It's incomplete, and we are still missing support for Inf,NaN, etc. And the Taylor series is unbounded, but the implementation can already compute a bunch of normal values in double precision and get bit accurate results. |
For a lib I am working on, I am computing rotation matrices obtained from Euler angles and compare them to (high precision) matrices provided by the literature. |
I implemented Sin, Cos, Tan, Exp, Log, Pow, and a few constants (pi, e, ln2). Can you think of other functions or constants? |
Doing a quick cprofile of nanoGPT model training on M1 CPU for the perf7 proposal:
It looks like torch.tanh() is really expensive and could use some love. BSD tanh() seems really branchy. |
In a short/medium/long term?
They are supported in rug or astro-float. See also, e.g., this paper.
The text was updated successfully, but these errors were encountered: