<i>Floating point precision problems on x86 musl</i> status still Open with 3 other changes
by
.
D 2022-07-15T11:54:27.294
J icomment After\sa\sbit\sof\strial\sand\serror,\sI\szeroed\sin\son\swhat\shappens\sbefore\sa\sreturn\sfrom\s`MakeLowPrecisionDouble`,\sand\sfound\sthat\sthe\s`TCL_DEFAULT_DOUBLE_ROUNDING`\smacro\sruns\sbefore\s`return\sretval;`\sbut\snot\sbefore\s`return\scopysign(0.0,\s-signum);`.\r\n\r\n\r\nBy\sadding\sthat\sto\smake\sthe\scode\sthat\sI\swas\scommenting\sout\slook\slike\sthis\s(of\scourse,\sno\slonger\scommented\sout\snow):\r\n```\r\n\s\s\s\sif\s(significand\s==\s0)\s{\r\n\tTCL_DEFAULT_DOUBLE_ROUNDING;\r\n\treturn\scopysign(0.0,\s-signum);\r\n\s\s\s\s}\r\n```\r\n\r\nThe\sproblem\swith\sTcl's\sexpr-old\sand\sformat\stests\sis\ssolved.\r\n\r\nI\swill\stry\sit\swith\sTcllib's\smath\sand\sunits\stests\sshortly,\sif\sI\sdon't\ssay\sanything\selse\sit\smeans\sthey\spass\stoo.\r\n\r\nI\sguess\sthis\sprobably\smeans\sglibc\sresets\sthe\srounding\smode\sautomatically,\sbut\smusl\sdoesn't.\r\n\r\nI\ssee\ssomething\ssimilar\shappens\swith\s`MakeHighPrecisionDouble`,\sbut\sI'll\sleave\sit\sto\sthose\smore\sknowledgeable\sthan\sme\sto\sdetermine\sif\sthe\s`TCL_DEFAULT_DOUBLE_ROUNDING`\sneeds\sto\sbe\sadded\sthere\sas\swell.
J login rubicon
J mimetype text/x-markdown
K 713653b951c625ef974f5f06b2e96634ca5fb1f9
U rubicon
Z 16e5343811d6c349a5267c219c85c2bf