mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/bigdecimal/lib/bigdecimal/*.rb: made module functions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
178dafefa9
commit
c1f1b452cb
5 changed files with 10 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
Tue Sep 22 04:56:18 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/bigdecimal/lib/bigdecimal/*.rb: made module functions.
|
||||
|
||||
Tue Sep 22 04:47:37 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/bigdecimal/bigdecimal.c (GetVpValue): support conversion from
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -28,6 +28,7 @@ require "bigdecimal/jacobian"
|
|||
module Newton
|
||||
include LUSolve
|
||||
include Jacobian
|
||||
module_function
|
||||
|
||||
def norm(fv,zero=0.0)
|
||||
s = zero
|
||||
|
|
Loading…
Add table
Reference in a new issue