Overview
| Artifact ID: | 1df76aeb53c781eccdbb1bd87a99646426bed858 |
|---|---|
| Ticket: | 3530004fffffffffffffffffffffffffffffffff
New function in "expr": sgn() |
| User & Date: | dkf on 2012-05-28 17:31:12 |
Changes
- icomment:
Here's a complete workaround (modulo ensuring that $x is numeric and handling NaN): proc tcl::mathfunc::sgn {x} { expr {$x < 0 ? -1 : $x > 0 ? 1 : 0} } The only question is whether Tcl should provide such a thing by default. - login: "dkf"
- mimetype: "text/plain"
- title changed to: "New function in "expr": sgn()"
- username: "dkf"