Hi Terrence,
here is some background information -
http://wiki.apache.org/stdcxx/FloatingPoint
(the cover of the Hitchhiker's Guide to the Galaxy comes to mind)
Regards,
Arjen
On 2009-02-21 18:22, trc wrote:
> Hi,
>
> I am using MSVC 9 with (Activestate) Tcl 8.5
>
> Example 21 fails as
Hello Terrence,
some interaction with a fellow Tcler made me realise that this
may be the "best" way to deal with NaNs of unclear denomination:
if { ![string is double $x] || $x != $x } {
... it is not a valid number or it is NaN
}
(sprintf() as used in the bindings will either produce a va
Hi Terrence,
just tried this with Tcl 8.5:
> set a NaN
NaN
> expr {$a==$a}
0
> string is double $a
1
So:
The string NaN is recognised as a "Not-a-Number", hence the failure of
the test "$a==$a" (one of the distinguishing properties of NaNs) but:
NaN is recognised as a double precision number
Hi Terrence,
that sounds like a good idea, but we need to check that this does
not have other conseqences (the formatting of a NaN seems to be
a perpetual minefield ...).
Regards,
Arjen
On 2009-02-21 18:22, trc wrote:
> Hi,
>
> I am using MSVC 9 with (Activestate) Tcl 8.5
>
> Example 21 fails
Hi,
I am using MSVC 9 with (Activestate) Tcl 8.5
Example 21 fails as follows -
can't use non-numeric string as operand of "+"
while executing
"expr {$lzmax + 0.01}"
(procedure "x21" line 167)
invoked from within
"x21"
(file "./x21" line 18)
Printing $lzmax shows t