-
Notifications
You must be signed in to change notification settings - Fork 1
add a few macros and functions #5
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
base: main
Are you sure you want to change the base?
Conversation
'too simple'
i removed it then |
bump |
test/test.gs
Outdated
ASSERT_EQ(LOGB(8, 2), 3, "LOGB(8, 2)") | ||
ASSERT_EQ(SIGN(123), 1, "SIGN(123)") | ||
ASSERT_EQ(SIGN(0), 0, "SIGN(0)") | ||
ASSERT_EQ(SIGN(-456), 1, "SIGN(-456)") |
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.
shouldn't this be -1?
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.
last one should be. ill change it
I now realise that making a pull request means that one should check through the code for obvious mistakes. i found another issue where the logb macro was tested, but it was previously removed, for example. i have checked through all the code. I think that I tested it at the time. However, due to floating point error, the test script might not be fully accurate. maybe a rounding to ~3dp would be ideal |
This pr just adds a few macros/functions that i thought would be useful