Skip to content
Tcl Source Code Artifact [f23f179884]
Login

Artifact [f23f179884]

Artifact f23f179884bef30c584d4aa314634f9695f862cfeeb27472c535e25045125c8e:

Ticket change [f23f179884] - Ticket [f05f5ef759c1f7f9|f05f5ef759] <i>lseq - duplicative expr eval, bottleneck by usage of operators, inconstistent handling of indices (int vs. double vs. error), etc</i> status still Open with 3 other changes by sebres on 2024-06-12 11:50:46.
D 2024-06-12T11:50:46.143
J icomment <blockquote><i>&gt;\sAs\sfor\s#3,\sit\swas\sintentional\sto\shave\sthe\sstring\srepresentation\sused\sto\sdetermine\sthe\snumber\sof\ssignificant\sfractional\sdigits.</i></blockquote>\r\n\r\nIt\swas\sclear\sto\sme.\sI\sonly\sspoke\sabout\sthat\sit\shappens\sinconsistently.\r\nAs\sI\ssaid\ssometimes\s(e.\sg.\sin\sexpressions)\sround-able\sdoubles\scauses\sinteger\sseries.\r\nFor\sinstance\s[./artifact?name=90d44fdab7ffb386&ln=4058-4061|this\sone]\savoided\sthat\sit'd\sreturn\soriginal\sdouble\sand\stherefore\sthe\s[./artifact?name=90d44fdab7ffb386&ln=4182|trigger\swith\suseDoubles]\swould\snot\sbe\sactive.\r\n\r\nLet\salone\sanother\scorner\scases,\se.\sg.\sfor\slarge\s(or\ssmall)\sdoubles\slike\s1e50\sthe\sexpression\s<code>floor(d)\s==\sd</code>\scould\sbe\stheoretically\strue,\sbut\sI\sdoubt\sit'd\swork\sin\sC\s(in\sopposite\sto\sTcl)\sdue\sto\sinteger\soverflow.\r\n\r\n<blockquote><i>&gt;It's\show\sone\scan\sintentionally\sget:\slseq\s1.0\s3.0\s1\s->\s"1.0\s2.0\s3.0\s4.0"\sversus\slseq\s1\s3\s1\s->\s"1\s2\s3\s4".</i></blockquote>\r\n\r\nYes,\sbut\snot\salways.\sHere\sis\san\sexample\swhere\sit\swas\snot\sso:\r\n<code><pre\sstyle="padding-left:2rem;">\r\n%\slseq\s\s\s\s\s\s\s\s1.0\s\s\s\s\s\s\s\s\s\s\s\s3.0\s\s\s\s\s1\r\n1.0\s2.0\s3.0\r\n%\slseq\s[expr\s{1.0+0}]\s[expr\s{3.0+0}]\s1\r\n1.0\s2.0\s3.0\r\n%\slseq\s\s\s\s\s\s\s{1.0+0}\s\s\s\s\s\s\s\s{3.0+0}\s\s1\r\n<span\sstyle="color:red;">1\s2\s3</span>\r\n%\slseq\s\s\s\s\s\s\s{1.1+0}\s\s\s\s\s\s\s\s{3.1+0}\s\s1\r\n1.1\s2.1\s3.1\r\n&nbsp;\r\n%\slseq\s[expr\s{1e50+0}]\s[expr\s{1e50+1}]\r\n1e+50\r\n%\slseq\s\s\s\s\s\s\s{1e50+0}\s\s\s\s\s\s\s\s{1e50+1}\r\n<span\sstyle="color:red;">bad\soperation\s"1e50+0":\smust\sbe\s..,\sto,\scount,\sor\sby</span>\r\n</pre></code>\r\n\r\nThis\sis\sexactly\swhat\sone'd\scall\sinconsistency.\sSo\sI\sfixed\sit\sduring\smy\sreview\stogether\swith\sother\sstuff.
J login sebres
J mimetype text/x-fossil-wiki
K f05f5ef759c1f7f93903fd873250a4c76147c4b2
U sebres
Z af6db1caa2d3b98b9d21f5b28942b0e4