summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/bigdecimal/MANIFEST6
-rw-r--r--ext/bigdecimal/sample/linear.rb (renamed from ext/bigdecimal/lib/linear.rb)0
-rw-r--r--ext/bigdecimal/sample/nlsolve.rb (renamed from ext/bigdecimal/lib/nlsolve.rb)0
-rw-r--r--ext/bigdecimal/sample/pi.rb (renamed from ext/bigdecimal/lib/pai.rb)13
4 files changed, 10 insertions, 9 deletions
diff --git a/ext/bigdecimal/MANIFEST b/ext/bigdecimal/MANIFEST
index 375f16c2ab2..7408e05284e 100644
--- a/ext/bigdecimal/MANIFEST
+++ b/ext/bigdecimal/MANIFEST
@@ -7,10 +7,10 @@ depend
extconf.rb
bigdecimal_en.html
bigdecimal_ja.html
-lib/nlsolve.rb
lib/jacobian.rb
lib/newton.rb
-lib/linear.rb
lib/ludcmp.rb
-lib/pai.rb
lib/bigdecimal-rational.rb
+sample/linear.rb
+sample/nlsolve.rb
+sample/pi.rb
diff --git a/ext/bigdecimal/lib/linear.rb b/ext/bigdecimal/sample/linear.rb
index f93404fb6ff..f93404fb6ff 100644
--- a/ext/bigdecimal/lib/linear.rb
+++ b/ext/bigdecimal/sample/linear.rb
diff --git a/ext/bigdecimal/lib/nlsolve.rb b/ext/bigdecimal/sample/nlsolve.rb
index 08f17f9ecd8..08f17f9ecd8 100644
--- a/ext/bigdecimal/lib/nlsolve.rb
+++ b/ext/bigdecimal/sample/nlsolve.rb
diff --git a/ext/bigdecimal/lib/pai.rb b/ext/bigdecimal/sample/pi.rb
index 4e2dd7104a1..cbb8448a380 100644
--- a/ext/bigdecimal/lib/pai.rb
+++ b/ext/bigdecimal/sample/pi.rb
@@ -1,14 +1,15 @@
#!/usr/local/bin/ruby
#
-# pai.rb
+# pi.rb
#
require "bigdecimal"
#
-# Calculates 3.1415.... using J. Machin's formula.
+# Calculates 3.1415.... (the number of times that a circle's diameter
+# will fit around the circle) using J. Machin's formula.
#
-def pai(sig) # sig: Number of significant figures
+def big_pi(sig) # sig: Number of significant figures
exp = -sig
pi = BigDecimal::new("0")
two = BigDecimal::new("2")
@@ -41,9 +42,9 @@ end
if $0 == __FILE__
if ARGV.size == 1
- print "PAI("+ARGV[0]+"):\n"
- p pai(ARGV[0].to_i)
+ print "PI("+ARGV[0]+"):\n"
+ p big_pi(ARGV[0].to_i)
else
- print "TRY: ruby pai.rb 1000 \n"
+ print "TRY: ruby pi.rb 1000 \n"
end
end