.
D 2010-12-17T23:37:38
J icomment Putting\ssignalling-NaN\sdetection\sinto\s[binary\sscan]\sis\sstarting\sto\sget\sawfully\sfar\safield\sof\sthe\soriginal\sproblem.\n\nNote\sthat\sthe\sstandard\sthat\syou\squote\smentions\sNaN\s(with\san\soptional\spreceding\ssign)\s-\sso\sthe\soriginal\scomplaint\sabout\s-NaN\swas\scomplaining\sabout\sstandard-compliant\sbehavior.\n\nIn\spractice,\swhat\shappens\sin\sthe\simplementation\sis\sthat\sthe\s'invalid'\sexception\sis\ssignalled\sand\smasked.\s(You\sneed\sto\sread\sthe\sdescription\sof\sexception\smasking\sas\swell.)\sMasking\ssome\sof\sthe\sIEEE-754\sexceptions\sis\sroutine\s-\sin\sfact,\sI\scan\shardly\simagine\swhat\sgood\scould\sever\scome\sof\sunmasking\s'inexact'.\sIt's\spretty\sroutine\sto\smask\sexponent\sunderflow\sand\stotal-loss-of-significance,\sand\snot\suncommon\sto\smask\sthe\sothers.\n\nIn\sany\scase,\sthe\scase\sthat\sI'm\smost\sworried\sabout\sis\sthe\soriginal\sreporter's\suse\scase,\swhere\sthe\soffending\sNaN\scame\sfrom\sTcl_NewDoubleObj\sor\sTcl_SetDoubleObj.\sSince\sthose\scontexts\sdon't\shave\san\sinterpreter\sin\swhich\sto\ssignal,\swe\shave\sto\sdo\s*something*\swith\sthem,\sand\sthe\schoices\sappear\sto\sbe\sto\smutate\sthe\svalue,\sto\scrash\sthe\sprocess,\sor\sto\smake\sTcl's\sentire\sfloating-point\spipeline\ssNaN-tolerant.\sNone\sof\sthese\sis\sideal.\sI've\squoted\sGene\sGolub\sin\sthe\spast\son\shis\sobservation\sthat\sthese\sevents\sare\scalled\s'exceptions'\sbecause,\sno\smatter\swhat\saction\sis\schosen,\ssomeone\swill\stake\sexception\swith\sit.\n
J login kennykb
J mimetype text/plain
J username kennykb
K 3105247fffffffffffffffffffffffffffffffff
U kennykb
Z a59a0bcc1241875e5155aa1d35c6dfea