.
D 2008-12-11T04:21:53
J icomment In\sthis\scase,\soverflow\sappears\simpossible.\sIt\sis\simportant\sto\sremember\sthat\snot\sall\sthe\sbits\sof\san\smp_digit\sare\sactually\sused;\sthe\smaximum\svalue\sfor\san\smp_digit\sis\s(1<<28)-1.\n\nSo\shere\sI\ssee\sthat\sr\s(a\s64-bit\sinteger)\sis\sset\sto\sthe\sproduct\sof\stwo\smp_digits\s(which\sis\sless\sthan\s2**56).\sIt's\ssubsequently\sdoubled,\sand\sthen\stwo\smore\smp_digits\sare\sadded\sto\sit,\sso\sit\swinds\sup\sstill\sless\sthan\s2**58\s+\s2**29.\s\sThis\sis\scomfortably\sless\sthan\s2**63-1,\sthe\smaximum\ssize\sof\san\smp_word.\n\nEven\sif\sMP_31BIT\sis\sdefined\s-\swhich\sTcl\sdoes\snot\sdo\s-\sthe\sresult\sof\sthis\saddition\sis\sat\smost\s2**62\s+\s2**32,\sstill\sless\sthan\s2**63-1.\s\s(Tcl\sdoes\snot\sdefine\sMP_31BIT\sbecause\sobserved\sperformance\sis\sbetter\swith\sthe\sComba\smultipliers,\swhich\sare\sincompatible\swith\sthat\soption.)\nOverflow\swould\sbe\spossible\sif\stommath\sused\sall\s32\sbits\sof\san\smp_digit.\s\sBut\sit\sdoesn't.\n\n\n\n
J login kennykb
J mimetype text/plain
J username kennykb
K 2413689fffffffffffffffffffffffffffffffff
U kennykb
Z d225fbcb4aea3d1abdd0dfba83a9fdf2