-
Notifications
You must be signed in to change notification settings - Fork 100
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
Make this work with overflow checks #4
Comments
I've done some work on this. It's not very principled at the moment, I just ran the tests on debug mode. I'm investigating fuzzing to see if I can get better coverage. Link: issue-4 |
Just want to note that this is not needed to get math support in wasm / core because the math functions will be compiled in release mode. It is however required to use the libm crate with the dev profile. |
What 's the status of this issue (and #142)? AFAIK, it blocks rust-num/num-traits#75 . |
I haven't done anything since I commented, fuzzing was taking to long on my laptop. I'll send a pull request for what I did, which won't be guaranteed to fix all the problems, but should be an improvement. |
I'm getting linker errors, so I will be delayed a bit. |
I am getting linker errors when running One is that it can't find Replacing |
Just a fyi: I found a case that may need to use wrapping:
Calling sqrt(2.0) in debug mode gives me: (using git master branch Oct 31, 2018)
|
I also get addition overflow panics with |
I did some fixes here that fix the issues I was having using the |
I got a subtract with overflow panic on floorf.rs just now. |
I am getting overflow errors from |
I ended up just forking this whole thing and fixing it by hand. You can see some of the PRs for examples of how to address it. Seems the maintainer is not around anymore. |
To clear some things up: I did some initial work on this, but it was never pushed. Then holidays ended, and I had less time to work on it. When I tried to come back to it, I got linker errors I couldn't solve. |
I believe this can be closed now that #168 was merged. |
Some math functions currently panic when compiled with overflow checks enabled (which is the default for dev builds). To fix this problem the
Wrapping
newtype and/or wrapping ops needs to be used in some parts of the implementations.To test that this works with overflow checks enabled uncomment this line in ci/script.sh.
The text was updated successfully, but these errors were encountered: