-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Fix errors in hyperbolic function crossover #1156
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
Fix errors in hyperbolic function crossover #1156
Conversation
|
Thanks! We're a bit busy at the moment with VS 2019 16.8 Preview 3 but we'll try to review your PRs soon. 😸 |
cbezault
left a comment
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.
I'm convinced that this is correct but could you add a (very) small test for this change? It could be as simple as using the examples that @statementreply put in #1059 as a sanity check.
- Fix integer truncation and off-by-one errors in calculating limit where exp(-x) can be ignored in hyperbolic functions.
fc95b36 to
3da2724
Compare
c5a8455 to
ecdfab4
Compare
Added test case. Sorry if my rebase messed things up, I can reset to fc95b36 if need be. |
StephanTLavavej
left a comment
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.
Thanks, this looks good to me! I'll push a couple of minor test changes.
|
Thanks for fixing these long-standing correctness bugs, and congratulations on your first microsoft/STL commit! 😺 🚀 |
Fixes #1059.
NBITSis the number of physical, not effective, bits, so(NBITS+2)is needed. Could also usenumeric_limits<T>::digits+1.