Overview
| Artifact ID: | 0734b126e00030e404293c6622508fafa6808b77 |
|---|---|
| Ticket: | 3105247fffffffffffffffffffffffffffffffff
-NaN? |
| User & Date: | kennykb on 2010-11-29 20:47:53 |
Changes
- icomment:
Why do we have to change it? The existing behaviour is *not* new - it's been in the code (and test suite - in binary.test) since before 8.5.0. The tests in util.test, it turns out, are a duplication of the ones in binary.test (They should be in both places - the one is checking that the result is formatted correctly, the other that [binary] doesn't error out returning it.) The format used by the code for non-canonical (I won't say "non-conforming": IEEE754 provides for them) NaN's exactly follows that used by David Gay's 'dtoa.c' cited in the TIP as the source of the algorithms. (The code was rewritten because it was not up to Tcl's usual coding standard.) It isn't something that the Tcl team invented. I don't understand the motivation for changing it now, years after release, to something that *is* a local invention, simply because the TIP was inadvertently silent on the treatment of the sign bit of a non-canonical NaN. (Which was an editorial error, I assure you: I wrote the original draft of the TIP and simply forgot to mention the sign bit.)
- login: "kennykb"
- mimetype: "text/plain"
- username: "kennykb"