Skip to content
Tcl Source Code Artifact [1df76aeb53]
Login

Artifact [1df76aeb53]

Artifact 1df76aeb53c781eccdbb1bd87a99646426bed858:

Ticket change [1df76aeb53] - Ticket [3530004fffffffff|3530004fff] <i>New function in &quot;expr&quot;: sgn()</i> status still Open with 5 other changes by dkf on 2012-05-28 17:31:12.
D 2012-05-28T17:31:12
J icomment Here's\sa\scomplete\sworkaround\s(modulo\sensuring\sthat\s$x\sis\snumeric\sand\shandling\sNaN):\n\n\s\sproc\stcl::mathfunc::sgn\s{x}\s{\n\s\s\s\s\s\sexpr\s{$x\s<\s0\s?\s-1\s:\s$x\s>\s0\s?\s1\s:\s0}\n\s\s}\n\nThe\sonly\squestion\sis\swhether\sTcl\sshould\sprovide\ssuch\sa\sthing\sby\sdefault.\n
J login dkf
J mimetype text/plain
J title New\sfunction\sin\s"expr":\ssgn()
J username dkf
K 3530004fffffffffffffffffffffffffffffffff
U dkf
Z 7eb3a488bbd7e1375876a3523b1bb429