From: Jeff Godfrey on 11 May 2010 15:05 Using AS 8.6b1.1 on Win7 x64... expr {1.0 - 1.0} --> 0.0 expr {abs(1.0 - 1.0)} --> -0.0 Why "-0.0" when using abs? Jeff
From: Don Porter on 11 May 2010 15:09 Jeff Godfrey wrote: > Using AS 8.6b1.1 on Win7 x64... > > expr {1.0 - 1.0} --> 0.0 > expr {abs(1.0 - 1.0)} --> -0.0 > > Why "-0.0" when using abs? Tcl Bug 2954959. Fixed for Tcl 8.5.9. -- | Don Porter Mathematical and Computational Sciences Division | | donald.porter(a)nist.gov Information Technology Laboratory | | http://math.nist.gov/~DPorter/ NIST | |______________________________________________________________________|
From: Bruce Stephens on 11 May 2010 15:10 Jeff Godfrey <jeff_godfrey(a)pobox.com> writes: > Using AS 8.6b1.1 on Win7 x64... > > expr {1.0 - 1.0} --> 0.0 > expr {abs(1.0 - 1.0)} --> -0.0 > > Why "-0.0" when using abs? Works with tclsh8.5, too (on GNU/Linux Debian 64-bit, FWIW). Not tclsh8.4, though. Worse than that: expr {abs(0.0)} --> -0.0
From: Bruce Stephens on 11 May 2010 15:11 Don Porter <dgp(a)nist.gov> writes: > Jeff Godfrey wrote: >> Using AS 8.6b1.1 on Win7 x64... >> >> expr {1.0 - 1.0} --> 0.0 >> expr {abs(1.0 - 1.0)} --> -0.0 >> >> Why "-0.0" when using abs? > > Tcl Bug 2954959. Fixed for Tcl 8.5.9. Ah, that would explain it for me. I have 8.5.8.
From: Jeff Godfrey on 11 May 2010 15:26 On 5/11/2010 2:09 PM, Don Porter wrote: > Jeff Godfrey wrote: >> Using AS 8.6b1.1 on Win7 x64... >> >> expr {1.0 - 1.0} --> 0.0 >> expr {abs(1.0 - 1.0)} --> -0.0 >> >> Why "-0.0" when using abs? > > Tcl Bug 2954959. Fixed for Tcl 8.5.9. Thanks Don. Jeff
|
Pages: 1 Prev: Maximum (practical) number of threads? Next: running a bat file from tcl expect |