-
Notifications
You must be signed in to change notification settings - Fork 373
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
feat: add Sine + Cosine + Signbit #805
Conversation
This version of sin.go comes from pre Go1. Futures versions rely on unsafe which is not yet implemented in gnovm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even if the code is from Go, Could you add some tests to ensure future stability ? :)
@albttx Yes, it never hurts! I can add some tests. |
Tests added for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 💯
Thank you for the addition 🙏
I suggest adding a new compatibility documentation file and using this PR as an example for updating helpers while maintaining the compatibility matrix. Please wait a bit longer before merging. |
Can you update this file: https://github.com/gnolang/gno/blob/master/gnovm/docs/go-gno-compatibility.md#stdlibs? |
Yes! Added now. |
reading now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice. feels good.
pinging @moul with the final vote to merge this. |
Description
This PR adds in the
math.Sin
andmath.Cos
methods. This file is from the Pre-Go 1 history: https://github.com/golang/go/blob/e4de2e7fd04c92d4035cd268d5043f2380aef437/src/pkg/math/sin.go The future versions had trouble with the gno language due to unsupported features.How has this been tested?
Yes, I am using it in a realm that I am working on (https://github.com/schollz/gno/tree/bytebeat). There are no tests for the math packages, but I can add tests if needed.