Skip to content
Tcl Source Code Artifact [4d29d813a0]
Login

Artifact [4d29d813a0]

Artifact 4d29d813a06d628e4da59ef9abf22c2b7bc1a213:

Ticket change [4d29d813a0] - Ticket [3105247fffffffff|3105247fff] <i>-NaN?</i> status still Open with 4 other changes by dkf on 2010-11-29 23:37:35.
D 2010-11-29T23:37:35
J icomment IMO,\sthere's\stwo\scases\sto\sconsider:\n\s\s*\sexternally-sourced\sNaNs\n\s\s*\sinternally-sourced\sNaNs\n\nIn\sthe\sformer\scase,\sthey\sshould\ssurvive\sa\strip\sin\s(via\s[binary\sscan])\sand\sout\sagain\s(via\s[binary\sformat])\swithout\sany\schange\sto\stheir\sbit\spattern,\sand\swhile\sin\sTcl\sshould\sbe\sunderstood\sto\swork\slike\sa\sNaN\sby\sbeing\snot\snumerically-equal\sto\sanything\selse;\slike\sthat,\sif\swe\sget\sone\sfrom\soutside\sbecause\sof\sa\sblunder\selsewhere,\swe\scan\sjust\spass\sit\son\scorrectly.\n\nIn\sthe\slatter\scase,\swe\sshould\sendeavor\sto\sensure\sthat\sthey\sare\strapped\sas\serrors\sat\sas\searly\san\sopportunity\sas\spossible;\sthis\sis\sindeed\sthe\scase\swith\sNaN\svalues\sthat\spass\sthrough\s[expr].\sOutside\sexpressions,\sthey're\sjust\sstrings.\n\nOverall,\sthat\smeans\sneither\sTcl_NewDoubleObj\snor\sTcl_GetDoubleFromObj\shas\sto\snot\schoke\son\sthem\sbut\sTcl_ExprObj\smust\snot\slike\sthem,\swhich\sis\scurrent\sbehavior.\sThe\sactual\sstring\sformat\sof\sNaN-values\sisn't\snearly\sso\simportant;\swe\swouldn't\scare\sexcept\swe\swant\sto\skeep\sthe\sgeneral\sinterconvertibility\sof\sdoubles\swith\sstrings\sso\sthat\swe\scan\spass\sthem\sback\sout\sagain\seven\sin\sthe\sface\sof\sshimmering\s(e.g.,\sif\ssome\snitwit\suses\s[llength]\son\sthem,\sit\sshouldn't\sbreak\sthe\sround\strip\srules).\n\nGiven\sall\sthe\sabove,\sI\sdon't\scare\stoo\smuch\sabout\schanging\sthings\sin\sthis\sarea\sand\sI\strust\skbk\sto\sget\sthings\sright.\sI\sparticularly\strust\shim\sto\sdeal\swith\scorrections\sto\sthe\sTIP,\ssince\sI\sbelieve\sthat\sconsiderations\sw.r.t.\sthe\ssign\sof\sNaN\swere\snot\sforemost\sin\sour\sminds\swhen\sthe\sdecision\swas\staken!\n
J login dkf
J mimetype text/plain
J username dkf
K 3105247fffffffffffffffffffffffffffffffff
U dkf
Z b5840fab42e16793b51fa918f3ad6e6c