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
Successor/predecessor functions use isnan() and isinf() #209
Conversation
isnan() and isinf() should more robust across different architectures than testing bit patterns. Also, the unions should use uint32_t/uint64_t since they're guaranteed to be the appropriate size. Signed-off-by: Cary Phillips <cary@ilm.com>
Maybe we should deprecate predf and succf, and change the implementations in the mean time to just call C++11 nextafter(). The only problem is that nextafter can throw, but I don't know if that will bother anybody, if anyone even actually uses succf/predf. |
I'm in favor of deprecation, with Cary's proposed re-implementation. |
Signed-off-by: Cary Phillips <cary@ilm.com>
Signed-off-by: Cary Phillips <cary@ilm.com>
Signed-off-by: Cary Phillips <cary@ilm.com>
Signed-off-by: Cary Phillips <cary@ilm.com>
I think all the i's have dotted and t's have crossed now? |
I think so, although I filed #211 to follow up on Larry's suggestion of just dispensing with succf/predf altogether. But this fix should suffice for now. |
…areFoundation#209) * Successor/predecessor functions use isnan() and isinf() isnan() and isinf() should more robust across different architectures than testing bit patterns. Also, the unions should use uint32_t/uint64_t since they're guaranteed to be the appropriate size. Signed-off-by: Cary Phillips <cary@ilm.com> * Add debugging info to testf()/testd() Signed-off-by: Cary Phillips <cary@ilm.com> * testf()/testd() checks isnan() Signed-off-by: Cary Phillips <cary@ilm.com> * Fix typo in testd() Signed-off-by: Cary Phillips <cary@ilm.com> * Cleanup & remove debugging info Signed-off-by: Cary Phillips <cary@ilm.com> * typo Signed-off-by: Cary Phillips <cary@ilm.com>
* Successor/predecessor functions use isnan() and isinf() isnan() and isinf() should more robust across different architectures than testing bit patterns. Also, the unions should use uint32_t/uint64_t since they're guaranteed to be the appropriate size. Signed-off-by: Cary Phillips <cary@ilm.com> * Add debugging info to testf()/testd() Signed-off-by: Cary Phillips <cary@ilm.com> * testf()/testd() checks isnan() Signed-off-by: Cary Phillips <cary@ilm.com> * Fix typo in testd() Signed-off-by: Cary Phillips <cary@ilm.com> * Cleanup & remove debugging info Signed-off-by: Cary Phillips <cary@ilm.com> * typo Signed-off-by: Cary Phillips <cary@ilm.com>
isnan() and isinf() should more robust across different architectures than testing bit patterns.
Also, the unions should use uint32_t/uint64_t since they're guaranteed to be the appropriate size.
Signed-off-by: Cary Phillips cary@ilm.com