diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-12-19 20:56:37 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-12-19 20:56:37 +0000 |
commit | 02a8d06fa8833db3c266663f31a82deb6e89b2d9 (patch) | |
tree | f322774139b892603c027ac385f2d6e73852ca77 /sample/pi.rb | |
parent | c37140b3519fd8028d3b720bbb76c14af2c4e093 (diff) |
Improve.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample/pi.rb')
-rw-r--r-- | sample/pi.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sample/pi.rb b/sample/pi.rb index 49067cc347..63be974285 100644 --- a/sample/pi.rb +++ b/sample/pi.rb @@ -2,7 +2,7 @@ k, a, b, a1, b1 = 2, 4, 1, 12, 4 -while TRUE +loop do # Next approximation p, q, k = k*k, 2*k+1, k+1 a, b, a1, b1 = a1, b1, p*a+q*a1, p*b+q*b1 |