diff options
author | Steve Bennett <steveb@workware.net.au> | 2010-01-24 12:00:22 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2010-10-15 11:02:43 +1000 |
commit | 2ae1c01c1b0b7d24fa2eeff3545b375d25c18c66 (patch) | |
tree | d37b63d50fea502fe61b98943ca380a4aa4d053d /bench.tcl | |
parent | 17b0f14f5e17efb7e70e47e711c6339e524875f8 (diff) | |
download | jimtcl-2ae1c01c1b0b7d24fa2eeff3545b375d25c18c66.zip jimtcl-2ae1c01c1b0b7d24fa2eeff3545b375d25c18c66.tar.gz jimtcl-2ae1c01c1b0b7d24fa2eeff3545b375d25c18c66.tar.bz2 |
Simplify expr evaluation
Diffstat (limited to 'bench.tcl')
-rw-r--r-- | bench.tcl | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -285,7 +285,7 @@ proc pi_digits {} { proc expand {} { for {set i 0} {$i < 100000} {incr i} { set a [list a b c d e f] - lappend b {expand}$a + lappend b {*}$a } } @@ -511,17 +511,17 @@ proc commonsub_test {} { ### MANDEL ##################################################################### proc mandel {xres yres infx infy supx supy} { - set incremx [expr {(0.0+$supx-$infx)/$xres}] - set incremy [expr {(0.0+$supy-$infy)/$yres}] + set incremx [expr {double($supx-$infx)/$xres}] + set incremy [expr {double($supy-$infy)/$yres}] for {set j 0} {$j < $yres} {incr j} { - set cim [expr {$infy+($incremy*$j)}] + set cim [expr {$infy+$incremy*$j}] set line {} for {set i 0} {$i < $xres} {incr i} { set counter 0 set zim 0 set zre 0 - set cre [expr {$infx+($incremx*$i)}] + set cre [expr {$infx+$incremx*$i}] while {$counter < 255} { set dam [expr {$zre*$zre-$zim*$zim+$cre}] set zim [expr {2*$zim*$zre+$cim}] |