summaryrefslogtreecommitdiff
path: root/ext/bigdecimal/lib
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bigdecimal/lib')
-rw-r--r--ext/bigdecimal/lib/bigdecimal/jacobian.rb2
-rw-r--r--ext/bigdecimal/lib/bigdecimal/ludcmp.rb2
-rw-r--r--ext/bigdecimal/lib/bigdecimal/math.rb1
-rw-r--r--ext/bigdecimal/lib/bigdecimal/newton.rb1
4 files changed, 6 insertions, 0 deletions
diff --git a/ext/bigdecimal/lib/bigdecimal/jacobian.rb b/ext/bigdecimal/lib/bigdecimal/jacobian.rb
index 8d8d583..e4420df 100644
--- a/ext/bigdecimal/lib/bigdecimal/jacobian.rb
+++ b/ext/bigdecimal/lib/bigdecimal/jacobian.rb
@@ -21,6 +21,8 @@
# fx is f.values(x).
#
module Jacobian
+ module_function
+
#--
def isEqual(a,b,zero=0.0,e=1.0e-8)
aa = a.abs
diff --git a/ext/bigdecimal/lib/bigdecimal/ludcmp.rb b/ext/bigdecimal/lib/bigdecimal/ludcmp.rb
index e18446d..9b2c3d2 100644
--- a/ext/bigdecimal/lib/bigdecimal/ludcmp.rb
+++ b/ext/bigdecimal/lib/bigdecimal/ludcmp.rb
@@ -2,6 +2,8 @@
# Solves a*x = b for x, using LU decomposition.
#
module LUSolve
+ module_function
+
# Performs LU decomposition of the n by n matrix a.
def ludecomp(a,n,zero=0,one=1)
prec = BigDecimal.limit(nil)
diff --git a/ext/bigdecimal/lib/bigdecimal/math.rb b/ext/bigdecimal/lib/bigdecimal/math.rb
index 635992e..191884e 100644
--- a/ext/bigdecimal/lib/bigdecimal/math.rb
+++ b/ext/bigdecimal/lib/bigdecimal/math.rb
@@ -29,6 +29,7 @@
# puts sin(a,100) # -> 0.10000000000000000000......E1
#
module BigMath
+ module_function
# Computes the square root of x to the specified number of digits of
# precision.
diff --git a/ext/bigdecimal/lib/bigdecimal/newton.rb b/ext/bigdecimal/lib/bigdecimal/newton.rb
index d78c3d7..cab2fcd 100644
--- a/ext/bigdecimal/lib/bigdecimal/newton.rb
+++ b/ext/bigdecimal/lib/bigdecimal/newton.rb
@@ -28,6 +28,7 @@ require "bigdecimal/jacobian"
module Newton
include LUSolve
include Jacobian
+ module_function
def norm(fv,zero=0.0)
s = zero