Re: Having difficulty getting a math expression to work
- From: Markus Triska <triska@xxxxxx>
- Date: Sat, 30 Sep 2006 20:02:09 +0200
Schelte Bron <nospam@xxxxxxxxxx> writes:
Tcl 8.5
Program (part and base are integral):
set part [expr round(pow(2,1020))]
set base [expr {2*$part}]
puts [expr {100.0 * $part / $base}]
puts [expr {(double($part)/$base)*100}]
Output:
Inf
50.0
Best wishes -- Markus Triska.
.
- Follow-Ups:
- Re: Having difficulty getting a math expression to work
- From: Don Porter
- Re: Having difficulty getting a math expression to work
- From: dbwalker0min@xxxxxxxxx
- Re: Having difficulty getting a math expression to work
- References:
- Having difficulty getting a math expression to work
- From: af300wsm
- Re: Having difficulty getting a math expression to work
- From: Schelte Bron
- Re: Having difficulty getting a math expression to work
- From: Markus Triska
- Re: Having difficulty getting a math expression to work
- From: Schelte Bron
- Having difficulty getting a math expression to work
- Prev by Date: Re: handling conditionals correctly
- Next by Date: Re: help matthias_hoffmann tclhttpd.exe
- Previous by thread: Re: Having difficulty getting a math expression to work
- Next by thread: Re: Having difficulty getting a math expression to work
- Index(es):