On Thu, Mar 25, 2010 at 3:01 PM, Curt Hagenlocher <curt at hagenlocher.org> wrote: > On Thu, Mar 25, 2010 at 7:54 AM, Mark Dickinson <dickinsm at gmail.com> wrote: >> >> Hmm. I take it back. I was being confused by the fact that sqrt(nan) >> returns a nan with a new identity; but it does apparently preserve >> the payload. An example: > > I played with this some a few months ago, and both the FPU and the C > libraries I tested will preserve the payload. I imagine Python just > inherits their behavior. Pretty much, yes. I think we've also taken care to preserve payloads in functions that have been added to the math library as well (e.g., the gamma function). Not that that's particularly hard: it's just a matter of making sure to do "if (isnan(x)) return x;" rather than "if (isnan(x)) return standard_python_nan;". If that's not true, then there's a minor bug to be corrected. Mark
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4