set pi [expr acos(-1)]
puts "# pi=$pi = acos(-1) == [expr atan(1)*4] = atan(1)*4"
# pi=3.141592653589793 = acos(-1) == 3.141592653589793 = atan(1)*4
set e [expr exp(1)]
puts "# e=$e"
# e=2.718281828459045
puts "# 20 != [expr pow($e,$pi)-$pi] http://xkcd.com/217/"
# 20 != 19.99909997918947 http://xkcd.com/217/
No comments:
Post a Comment