bigdecimal-math_r 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +63 -10
- data/changelog.md +32 -0
- data/ext/bigdecimal/math_r/algofunc.h +11 -1
- data/ext/bigdecimal/math_r/api/bigmath/const_e.h +1 -1
- data/ext/bigdecimal/math_r/api/bigmath/const_euler_gamma.h +5 -0
- data/ext/bigdecimal/math_r/api/bigmath/csqrt.h +1 -1
- data/ext/bigdecimal/math_r/api/kernel/rb_BigDecimal_flo.h +8 -2
- data/ext/bigdecimal/math_r/api/numeric/domain_p.h +7 -0
- data/ext/bigdecimal/math_r/api/numeric/nan_p.h +4 -1
- data/ext/bigdecimal/math_r/api.h +2 -0
- data/ext/bigdecimal/math_r/const.c +42 -5
- data/ext/bigdecimal/math_r/decl.h +11 -1
- data/ext/bigdecimal/math_r/exp.c +45 -3
- data/ext/bigdecimal/math_r/extconf.rb +5 -1
- data/ext/bigdecimal/math_r/{gamma_r.c → gamma_beta.c} +11 -78
- data/ext/bigdecimal/math_r/internal/algo/bigmath/E/{ser.h → napier.h} +1 -1
- data/ext/bigdecimal/math_r/internal/algo/bigmath/EulerGamma/borwein_bailey.h +37 -0
- data/ext/bigdecimal/math_r/internal/algo/bigmath/LOG10/ser.h +4 -2
- data/ext/bigdecimal/math_r/internal/algo/bigmath/LOG_PI/builtin.h +3 -1
- data/ext/bigdecimal/math_r/internal/algo/bigmath/SQRT2/builtin.h +4 -1
- data/ext/bigdecimal/math_r/internal/algo/bigmath/SQRT3/builtin.h +4 -1
- data/ext/bigdecimal/math_r/internal/algo/bigmath/acos/branch.h +11 -4
- data/ext/bigdecimal/math_r/internal/algo/bigmath/acosh/branch.h +2 -2
- data/ext/bigdecimal/math_r/internal/algo/bigmath/acosh/edom.h +7 -5
- data/ext/bigdecimal/math_r/internal/algo/bigmath/acot/logrep.h +9 -6
- data/ext/bigdecimal/math_r/internal/algo/bigmath/acoth/branch.h +4 -4
- data/ext/bigdecimal/math_r/internal/algo/bigmath/acoth/edom.h +4 -3
- data/ext/bigdecimal/math_r/internal/algo/bigmath/acoth/logrep.h +5 -2
- data/ext/bigdecimal/math_r/internal/algo/bigmath/acsc/branch.h +3 -4
- data/ext/bigdecimal/math_r/internal/algo/bigmath/acsc/edom.h +7 -6
- data/ext/bigdecimal/math_r/internal/algo/bigmath/acsc/logrep.h +6 -5
- data/ext/bigdecimal/math_r/internal/algo/bigmath/acsch/branch.h +3 -9
- data/ext/bigdecimal/math_r/internal/algo/bigmath/acsch/logrep.h +7 -6
- data/ext/bigdecimal/math_r/internal/algo/bigmath/asec/branch.h +7 -4
- data/ext/bigdecimal/math_r/internal/algo/bigmath/asec/edom.h +7 -6
- data/ext/bigdecimal/math_r/internal/algo/bigmath/asec/logrep.h +8 -7
- data/ext/bigdecimal/math_r/internal/algo/bigmath/asech/branch.h +2 -5
- data/ext/bigdecimal/math_r/internal/algo/bigmath/asech/edom.h +10 -6
- data/ext/bigdecimal/math_r/internal/algo/bigmath/asech/logrep.h +3 -2
- data/ext/bigdecimal/math_r/internal/algo/bigmath/asin/branch.h +4 -2
- data/ext/bigdecimal/math_r/internal/algo/bigmath/asin/edom.h +6 -5
- data/ext/bigdecimal/math_r/internal/algo/bigmath/asin/logrep.h +3 -2
- data/ext/bigdecimal/math_r/internal/algo/bigmath/asin/ser.h +1 -0
- data/ext/bigdecimal/math_r/internal/algo/bigmath/asinh/logrep.h +6 -5
- data/ext/bigdecimal/math_r/internal/algo/bigmath/asinh/ser.h +1 -0
- data/ext/bigdecimal/math_r/internal/algo/bigmath/atan/branch.h +1 -1
- data/ext/bigdecimal/math_r/internal/algo/bigmath/atan/logrep.h +7 -6
- data/ext/bigdecimal/math_r/internal/algo/bigmath/atan/ser_euler.h +4 -50
- data/ext/bigdecimal/math_r/internal/algo/bigmath/atan/ser_usual.h +2 -9
- data/ext/bigdecimal/math_r/internal/algo/bigmath/atanh/branch.h +4 -3
- data/ext/bigdecimal/math_r/internal/algo/bigmath/atanh/edom.h +6 -3
- data/ext/bigdecimal/math_r/internal/algo/bigmath/atanh/logrep.h +2 -0
- data/ext/bigdecimal/math_r/internal/algo/bigmath/atanh/ser.h +1 -0
- data/ext/bigdecimal/math_r/internal/algo/bigmath/cabs/formula.h +6 -2
- data/ext/bigdecimal/math_r/internal/algo/bigmath/cacos/logrep.h +7 -4
- data/ext/bigdecimal/math_r/internal/algo/bigmath/cacosh/logrep.h +6 -5
- data/ext/bigdecimal/math_r/internal/algo/bigmath/cacot/logrep.h +3 -2
- data/ext/bigdecimal/math_r/internal/algo/bigmath/cacoth/logrep.h +8 -4
- data/ext/bigdecimal/math_r/internal/algo/bigmath/cacsc/logrep.h +5 -4
- data/ext/bigdecimal/math_r/internal/algo/bigmath/cacsch/logrep.h +7 -3
- data/ext/bigdecimal/math_r/internal/algo/bigmath/carg/formula.h +6 -2
- data/ext/bigdecimal/math_r/internal/algo/bigmath/casec/logrep.h +5 -4
- data/ext/bigdecimal/math_r/internal/algo/bigmath/casech/logrep.h +3 -1
- data/ext/bigdecimal/math_r/internal/algo/bigmath/casin/logrep.h +6 -4
- data/ext/bigdecimal/math_r/internal/algo/bigmath/casinh/logrep.h +1 -0
- data/ext/bigdecimal/math_r/internal/algo/bigmath/catan/logrep.h +3 -2
- data/ext/bigdecimal/math_r/internal/algo/bigmath/catanh/logrep.h +5 -2
- data/ext/bigdecimal/math_r/internal/algo/bigmath/ccbrt/branch.h +40 -0
- data/ext/bigdecimal/math_r/internal/algo/bigmath/ccbrt/formula.h +5 -2
- data/ext/bigdecimal/math_r/internal/algo/bigmath/ccos/eulerf.h +4 -3
- data/ext/bigdecimal/math_r/internal/algo/bigmath/ccosh/eulerf.h +4 -3
- data/ext/bigdecimal/math_r/internal/algo/bigmath/ccot/eulerf.h +5 -3
- data/ext/bigdecimal/math_r/internal/algo/bigmath/ccoth/eulerf.h +4 -2
- data/ext/bigdecimal/math_r/internal/algo/bigmath/ccsc/eulerf.h +4 -2
- data/ext/bigdecimal/math_r/internal/algo/bigmath/ccsch/eulerf.h +5 -3
- data/ext/bigdecimal/math_r/internal/algo/bigmath/cexp/eulerf.h +10 -7
- data/ext/bigdecimal/math_r/internal/algo/bigmath/cexp2/eulerf.h +5 -3
- data/ext/bigdecimal/math_r/internal/algo/bigmath/cexpm1/branch.h +13 -0
- data/ext/bigdecimal/math_r/internal/algo/bigmath/cexpm1/identity.h +17 -0
- data/ext/bigdecimal/math_r/internal/algo/bigmath/clog/branch.h +11 -12
- data/ext/bigdecimal/math_r/internal/algo/bigmath/clog10/branch.h +53 -0
- data/ext/bigdecimal/math_r/internal/algo/bigmath/clog10/formula.h +4 -3
- data/ext/bigdecimal/math_r/internal/algo/bigmath/clog2/branch.h +53 -0
- data/ext/bigdecimal/math_r/internal/algo/bigmath/clog2/formula.h +4 -3
- data/ext/bigdecimal/math_r/internal/algo/bigmath/cos/eulerf.h +6 -4
- data/ext/bigdecimal/math_r/internal/algo/bigmath/cos/ser.h +4 -4
- data/ext/bigdecimal/math_r/internal/algo/bigmath/cosh/eulerf.h +5 -3
- data/ext/bigdecimal/math_r/internal/algo/bigmath/cosh/formula.h +5 -5
- data/ext/bigdecimal/math_r/internal/algo/bigmath/cosh/ser.h +4 -3
- data/ext/bigdecimal/math_r/internal/algo/bigmath/cot/eulerf.h +5 -3
- data/ext/bigdecimal/math_r/internal/algo/bigmath/cot/ser.h +3 -2
- data/ext/bigdecimal/math_r/internal/algo/bigmath/coth/eulerf.h +4 -2
- data/ext/bigdecimal/math_r/internal/algo/bigmath/coth/formula.h +1 -0
- data/ext/bigdecimal/math_r/internal/algo/bigmath/coth/ser.h +3 -2
- data/ext/bigdecimal/math_r/internal/algo/bigmath/cpow/formula.h +9 -7
- data/ext/bigdecimal/math_r/internal/algo/bigmath/csc/eulerf.h +4 -2
- data/ext/bigdecimal/math_r/internal/algo/bigmath/csc/ser.h +5 -3
- data/ext/bigdecimal/math_r/internal/algo/bigmath/csch/eulerf.h +5 -3
- data/ext/bigdecimal/math_r/internal/algo/bigmath/csch/formula.h +2 -2
- data/ext/bigdecimal/math_r/internal/algo/bigmath/csch/ser.h +6 -3
- data/ext/bigdecimal/math_r/internal/algo/bigmath/csec/eulerf.h +5 -3
- data/ext/bigdecimal/math_r/internal/algo/bigmath/csech/eulerf.h +5 -3
- data/ext/bigdecimal/math_r/internal/algo/bigmath/csin/eulerf.h +4 -3
- data/ext/bigdecimal/math_r/internal/algo/bigmath/csinh/eulerf.h +4 -3
- data/ext/bigdecimal/math_r/internal/algo/bigmath/csqrt/branch.h +40 -0
- data/ext/bigdecimal/math_r/internal/algo/bigmath/csqrt/formula.h +13 -43
- data/ext/bigdecimal/math_r/internal/algo/bigmath/ctan/eulerf.h +4 -3
- data/ext/bigdecimal/math_r/internal/algo/bigmath/ctanh/eulerf.h +4 -3
- data/ext/bigdecimal/math_r/internal/algo/bigmath/cuberoot/branch.h +18 -0
- data/ext/bigdecimal/math_r/internal/algo/bigmath/cuberoot/newton.h +4 -12
- data/ext/bigdecimal/math_r/internal/algo/bigmath/erf/algo911.h +7 -4
- data/ext/bigdecimal/math_r/internal/algo/bigmath/erf/cf.h +1 -0
- data/ext/bigdecimal/math_r/internal/algo/bigmath/erf/ser_inf.h +1 -0
- data/ext/bigdecimal/math_r/internal/algo/bigmath/erf/ser_zero.h +1 -0
- data/ext/bigdecimal/math_r/internal/algo/bigmath/erfc/algo911.h +5 -2
- data/ext/bigdecimal/math_r/internal/algo/bigmath/erfc/cf.h +1 -0
- data/ext/bigdecimal/math_r/internal/algo/bigmath/escalb/edf.h +2 -0
- data/ext/bigdecimal/math_r/internal/algo/bigmath/exp/builtin.h +7 -1
- data/ext/bigdecimal/math_r/internal/algo/bigmath/exp/edf.h +6 -5
- data/ext/bigdecimal/math_r/internal/algo/bigmath/exp2/edf.h +9 -5
- data/ext/bigdecimal/math_r/internal/algo/bigmath/expm1/branch.h +13 -0
- data/ext/bigdecimal/math_r/internal/algo/bigmath/expm1/identity.h +18 -0
- data/ext/bigdecimal/math_r/internal/algo/bigmath/expxt/edf.h +1 -1
- data/ext/bigdecimal/math_r/internal/algo/bigmath/f_euler/formula.h +3 -2
- data/ext/bigdecimal/math_r/internal/algo/bigmath/hypot/l2norm.h +5 -4
- data/ext/bigdecimal/math_r/internal/algo/bigmath/hypot/mmm.h +1 -1
- data/ext/bigdecimal/math_r/internal/algo/bigmath/ipow/edf.h +6 -4
- data/ext/bigdecimal/math_r/internal/algo/bigmath/l2norm/formula.h +6 -1
- data/ext/bigdecimal/math_r/internal/algo/bigmath/log/branch.h +6 -2
- data/ext/bigdecimal/math_r/internal/algo/bigmath/log/builtin.h +3 -2
- data/ext/bigdecimal/math_r/internal/algo/bigmath/log/edf.h +8 -5
- data/ext/bigdecimal/math_r/internal/algo/bigmath/log/edom.h +10 -4
- data/ext/bigdecimal/math_r/internal/algo/bigmath/log/mercator.h +7 -9
- data/ext/bigdecimal/math_r/internal/algo/bigmath/log/ser_okumura.h +4 -1
- data/ext/bigdecimal/math_r/internal/algo/bigmath/log10/edf.h +3 -2
- data/ext/bigdecimal/math_r/internal/algo/bigmath/log10/mercator.h +9 -9
- data/ext/bigdecimal/math_r/internal/algo/bigmath/log1p/branch.h +8 -5
- data/ext/bigdecimal/math_r/internal/algo/bigmath/log1p/ser_mercator.h +16 -6
- data/ext/bigdecimal/math_r/internal/algo/bigmath/log2/branch.h +1 -1
- data/ext/bigdecimal/math_r/internal/algo/bigmath/log2/edf.h +3 -2
- data/ext/bigdecimal/math_r/internal/algo/bigmath/log2/mercator.h +9 -9
- data/ext/bigdecimal/math_r/internal/algo/bigmath/logxt/edf.h +6 -1
- data/ext/bigdecimal/math_r/internal/algo/bigmath/pow/formula.h +13 -8
- data/ext/bigdecimal/math_r/internal/algo/bigmath/rcm10/edf.h +10 -4
- data/ext/bigdecimal/math_r/internal/algo/bigmath/rcm2/edf.h +11 -3
- data/ext/bigdecimal/math_r/internal/algo/bigmath/sec/eulerf.h +5 -3
- data/ext/bigdecimal/math_r/internal/algo/bigmath/sec/ser.h +6 -4
- data/ext/bigdecimal/math_r/internal/algo/bigmath/sech/eulerf.h +5 -3
- data/ext/bigdecimal/math_r/internal/algo/bigmath/sech/formula.h +8 -4
- data/ext/bigdecimal/math_r/internal/algo/bigmath/sech/ser.h +5 -3
- data/ext/bigdecimal/math_r/internal/algo/bigmath/sin/eulerf.h +5 -2
- data/ext/bigdecimal/math_r/internal/algo/bigmath/sin/ser.h +4 -5
- data/ext/bigdecimal/math_r/internal/algo/bigmath/sincos/ser.h +9 -2
- data/ext/bigdecimal/math_r/internal/algo/bigmath/sinh/eulerf.h +5 -3
- data/ext/bigdecimal/math_r/internal/algo/bigmath/sinh/formula.h +8 -4
- data/ext/bigdecimal/math_r/internal/algo/bigmath/sinh/ser.h +4 -3
- data/ext/bigdecimal/math_r/internal/algo/bigmath/sinhcosh/ser.h +10 -3
- data/ext/bigdecimal/math_r/internal/algo/bigmath/sqrt/branch.h +2 -1
- data/ext/bigdecimal/math_r/internal/algo/bigmath/sqrt/builtin.h +2 -2
- data/ext/bigdecimal/math_r/internal/algo/bigmath/sqrt/edom.h +1 -0
- data/ext/bigdecimal/math_r/internal/algo/bigmath/tan/eulerf.h +5 -3
- data/ext/bigdecimal/math_r/internal/algo/bigmath/tan/ser.h +3 -8
- data/ext/bigdecimal/math_r/internal/algo/bigmath/tanh/eulerf.h +5 -3
- data/ext/bigdecimal/math_r/internal/algo/bigmath/tanh/formula.h +7 -3
- data/ext/bigdecimal/math_r/internal/algo/bigmath/tanh/ser.h +3 -3
- data/ext/bigdecimal/math_r/internal/algo/bigmath/trig/f_euler.h +11 -5
- data/ext/bigdecimal/math_r/log.c +5 -5
- data/ext/bigdecimal/math_r/math_r/bigdecimal.h +5 -1
- data/ext/bigdecimal/math_r/math_r/bigmath.h +2 -0
- data/ext/bigdecimal/math_r/math_r/globals.h +1 -1
- data/ext/bigdecimal/math_r/math_r/numeric.h +1 -0
- data/ext/bigdecimal/math_r/math_r.c +14 -3
- data/ext/bigdecimal/math_r/solver.c +75 -21
- data/lib/bigdecimal/math_r/const/E_euler.rb +46 -0
- data/lib/bigdecimal/math_r/version.rb +1 -1
- data/lib/bigdecimal/math_r.rb +1 -0
- metadata +21 -11
- data/.ruby-version +0 -1
- data/LICENSE.txt +0 -21
- data/lib/bigdecimal/math_r.so +0 -0
@@ -263,18 +263,24 @@ f_euler_esc(const ID func, VALUE z, VALUE prec)
|
|
263
263
|
VALUE
|
264
264
|
trig_f_euler(const ID func, VALUE theta, VALUE prec)
|
265
265
|
{
|
266
|
-
VALUE h = Qundef, sc = Qundef;
|
266
|
+
VALUE h = Qundef, sc = Qundef, n;
|
267
|
+
|
268
|
+
rb_check_precise(prec);
|
269
|
+
n = rb_numdiff_make_n(prec);
|
270
|
+
|
267
271
|
if (rb_num_nan_p(theta))
|
268
272
|
return rb_Complex(BIG_NAN, BIG_NAN);
|
269
273
|
if (rb_num_zero_p(rb_num_imag(theta)))
|
270
274
|
{
|
271
|
-
h = f_euler_h(func, theta,
|
275
|
+
h = f_euler_h(func, theta, n);
|
276
|
+
h = rb_num_round(h, prec);
|
272
277
|
if (rb_num_nan_p(h))
|
273
278
|
return h;
|
274
279
|
}
|
275
280
|
if (rb_num_zero_p(rb_num_real(theta)))
|
276
281
|
{
|
277
|
-
sc = f_euler_sc(func, theta,
|
282
|
+
sc = f_euler_sc(func, theta, n);
|
283
|
+
sc = rb_num_round(sc, prec);
|
278
284
|
if (rb_num_nan_p(sc))
|
279
285
|
return sc;
|
280
286
|
}
|
@@ -284,7 +290,7 @@ trig_f_euler(const ID func, VALUE theta, VALUE prec)
|
|
284
290
|
return sc;
|
285
291
|
else
|
286
292
|
{
|
287
|
-
VALUE y = f_euler_esc(func, theta,
|
288
|
-
return y;
|
293
|
+
VALUE y = f_euler_esc(func, theta, n);
|
294
|
+
return rb_num_round(y, prec);
|
289
295
|
}
|
290
296
|
}
|
data/ext/bigdecimal/math_r/log.c
CHANGED
@@ -201,7 +201,7 @@ __impl_clog_formula(VALUE unused_obj, VALUE z, VALUE prec)
|
|
201
201
|
static VALUE
|
202
202
|
__impl_clog2_formula(VALUE unused_obj, VALUE z, VALUE prec)
|
203
203
|
{
|
204
|
-
return
|
204
|
+
return clog2_branch(z, prec, clog2_formula);
|
205
205
|
}
|
206
206
|
|
207
207
|
/**
|
@@ -220,7 +220,7 @@ __impl_clog2_formula(VALUE unused_obj, VALUE z, VALUE prec)
|
|
220
220
|
static VALUE
|
221
221
|
__impl_clog10_formula(VALUE unused_obj, VALUE z, VALUE prec)
|
222
222
|
{
|
223
|
-
return
|
223
|
+
return clog10_branch(z, prec, clog10_formula);
|
224
224
|
}
|
225
225
|
|
226
226
|
|
@@ -243,9 +243,9 @@ InitVM_Log(void)
|
|
243
243
|
rb_define_module_function(rb_mLog, "log_builtin", __impl_log_builtin, 2);
|
244
244
|
rb_define_module_function(rb_mLog, "log_ser_okumura", __impl_log_ser_okumura, 2);
|
245
245
|
|
246
|
-
rb_define_module_function(
|
247
|
-
rb_define_module_function(
|
248
|
-
rb_define_module_function(
|
246
|
+
rb_define_module_function(rb_mLog, "log_edf", __impl_log_edf, 2);
|
247
|
+
rb_define_module_function(rb_mLog, "log2_edf", __impl_log2_edf, 2);
|
248
|
+
rb_define_module_function(rb_mLog, "log10_edf", __impl_log10_edf, 2);
|
249
249
|
|
250
250
|
rb_define_module_function(rb_mLog, "log1p_ser_mercator", __impl_log1p_ser_mercator, 2);
|
251
251
|
rb_define_module_function(rb_mLog, "log1p_p_adic", __impl_log1p_p_adic, 2);
|
@@ -1,8 +1,12 @@
|
|
1
1
|
#ifndef INTERNAL_API_BIGDECIMAL
|
2
2
|
#define INTERNAL_API_BIGDECIMAL
|
3
3
|
|
4
|
-
|
4
|
+
/**
|
5
|
+
* Query the Parameter `prec` that is in valid range $p \lt 0$.
|
6
|
+
* if invalid range, error occurrd.
|
7
|
+
*/
|
5
8
|
void rb_check_precise(VALUE prec);
|
9
|
+
#define CheckPrecise(prec) rb_check_precise(prec)
|
6
10
|
|
7
11
|
VALUE rb_big_zero(void);
|
8
12
|
#define BIG_ZERO rb_big_zero()
|
@@ -5,6 +5,7 @@
|
|
5
5
|
#define DEF_PREC 1000
|
6
6
|
#define BIGMATH_PI "$M_PI"
|
7
7
|
#define BIGMATH_E "$M_E"
|
8
|
+
#define BIGMATH_EulerGamma "$M_EulerGamma"
|
8
9
|
#define BIGMATH_LOG2 "$M_LOG2"
|
9
10
|
#define BIGMATH_LOG10 "$M_LOG10"
|
10
11
|
#define BIGMATH_LOG_PI "$M_LOG_PI"
|
@@ -21,6 +22,7 @@ VALUE rb_bigmath_const(const char *gv, VALUE (*func)(VALUE prec), VALUE prec);
|
|
21
22
|
VALUE rb_bigmath_const_pi(VALUE prec);
|
22
23
|
VALUE rb_bigmath_const_log_pi(VALUE prec);
|
23
24
|
VALUE rb_bigmath_const_e(VALUE prec);
|
25
|
+
VALUE rb_bigmath_const_euler_gamma(VALUE prec);
|
24
26
|
VALUE rb_bigmath_const_log2(VALUE prec);
|
25
27
|
VALUE rb_bigmath_const_log10(VALUE prec);
|
26
28
|
VALUE rb_bigmath_const_sqrt2(VALUE prec);
|
@@ -23,7 +23,7 @@ RUBY_EXT_EXTERN VALUE rb_mComplexPlane;
|
|
23
23
|
RUBY_EXT_EXTERN VALUE rb_mEulerF;
|
24
24
|
RUBY_EXT_EXTERN VALUE rb_mLogRep;
|
25
25
|
RUBY_EXT_EXTERN VALUE rb_mPower;
|
26
|
-
RUBY_EXT_EXTERN VALUE
|
26
|
+
RUBY_EXT_EXTERN VALUE rb_mGammaBeta;
|
27
27
|
RUBY_EXT_EXTERN VALUE rb_mErf;
|
28
28
|
RUBY_EXT_EXTERN VALUE rb_mSolver;
|
29
29
|
|
@@ -7,6 +7,7 @@
|
|
7
7
|
#include <ruby.h>
|
8
8
|
#define DEFINE_SYMBOL
|
9
9
|
#include "math_r/globals.h"
|
10
|
+
#include "math_r/bigmath.h"
|
10
11
|
|
11
12
|
void InitVM_Overrides(void);
|
12
13
|
void InitVM_Const(void);
|
@@ -20,7 +21,7 @@ void InitVM_EulerF(void);
|
|
20
21
|
void InitVM_LogRep(void);
|
21
22
|
void InitVM_Power(void);
|
22
23
|
void InitVM_Erf(void);
|
23
|
-
void
|
24
|
+
void InitVM_GammaBeta(void);
|
24
25
|
void InitVM_Solver(void);
|
25
26
|
|
26
27
|
/**
|
@@ -35,6 +36,16 @@ void InitVM_Solver(void);
|
|
35
36
|
void
|
36
37
|
Init_math_r(void)
|
37
38
|
{
|
39
|
+
|
40
|
+
rb_gv_set(BIGMATH_PI, Qnil);
|
41
|
+
rb_gv_set(BIGMATH_E, Qnil);
|
42
|
+
rb_gv_set(BIGMATH_EulerGamma, Qnil);
|
43
|
+
rb_gv_set(BIGMATH_LOG2, Qnil);
|
44
|
+
rb_gv_set(BIGMATH_LOG10, Qnil);
|
45
|
+
rb_gv_set(BIGMATH_LOG_PI, Qnil);
|
46
|
+
rb_gv_set(BIGMATH_SQRT2, Qnil);
|
47
|
+
rb_gv_set(BIGMATH_SQRT3, Qnil);
|
48
|
+
|
38
49
|
mf_exp = rb_intern_const("exp");
|
39
50
|
mf_exp2 = rb_intern_const("exp2");
|
40
51
|
mf_expm1 = rb_intern_const("expm1");
|
@@ -121,8 +132,8 @@ Init_math_r(void)
|
|
121
132
|
rb_mErf = rb_define_module_under(rb_mBigMathR, "Erf");
|
122
133
|
InitVM(Erf);
|
123
134
|
|
124
|
-
|
125
|
-
InitVM(
|
135
|
+
rb_mGammaBeta = rb_define_module_under(rb_mBigMathR, "GammaBeta");
|
136
|
+
InitVM(GammaBeta);
|
126
137
|
|
127
138
|
rb_mSolver = rb_define_module_under(rb_mBigMathR, "Solver");
|
128
139
|
InitVM(Solver);
|
@@ -74,15 +74,15 @@ bigmath_func1 cb_casech;
|
|
74
74
|
bigmath_func1 cb_acoth;
|
75
75
|
bigmath_func1 cb_cacoth;
|
76
76
|
|
77
|
+
bigmath_func1 cb_sqrt;
|
78
|
+
bigmath_func1 cb_csqrt;
|
79
|
+
bigmath_func1 cb_cbrt;
|
80
|
+
bigmath_func1 cb_ccbrt;
|
81
|
+
|
82
|
+
bigmath_func1 cb_erf;
|
83
|
+
bigmath_func1 cb_erfc;
|
77
84
|
|
78
85
|
|
79
|
-
static bool
|
80
|
-
domain_p(VALUE range, VALUE x)
|
81
|
-
{
|
82
|
-
const ID cover_p = rb_intern("cover?");
|
83
|
-
VALUE ans = rb_funcall(range, cover_p, 1, x);
|
84
|
-
return ans == Qtrue ? true : false;
|
85
|
-
}
|
86
86
|
|
87
87
|
static void
|
88
88
|
rb_id_includes(int n, const ID *funcs, ID func)
|
@@ -867,7 +867,7 @@ solver_triginv(ID func, VALUE z, VALUE prec)
|
|
867
867
|
if (func == mf_asin)
|
868
868
|
{
|
869
869
|
VALUE domain = rb_range_new(INT2FIX(-1), INT2FIX(1), 0);
|
870
|
-
if (
|
870
|
+
if (rb_num_domain_p(domain, z))
|
871
871
|
w = asin_branch(z, prec, cb_asin);
|
872
872
|
else
|
873
873
|
w = asin_edom(z, prec);
|
@@ -875,7 +875,7 @@ solver_triginv(ID func, VALUE z, VALUE prec)
|
|
875
875
|
else if (func == mf_acos)
|
876
876
|
{
|
877
877
|
VALUE domain = rb_range_new(INT2FIX(-1), INT2FIX(1), 0);
|
878
|
-
if (
|
878
|
+
if (rb_num_domain_p(domain, z))
|
879
879
|
w = acos_branch(z, prec, cb_acos);
|
880
880
|
else
|
881
881
|
w = acos_edom(z, prec);
|
@@ -886,7 +886,7 @@ solver_triginv(ID func, VALUE z, VALUE prec)
|
|
886
886
|
{
|
887
887
|
VALUE m_domain = rb_range_new(BIG_MINUS_INF, BIG_MINUS_ONE, 0);
|
888
888
|
VALUE p_domain = rb_range_new(BIG_ONE, BIG_INF, 0);
|
889
|
-
if (
|
889
|
+
if (rb_num_domain_p(m_domain, z) || rb_num_domain_p(p_domain, z))
|
890
890
|
w = acsc_branch(z, prec, cb_acsc);
|
891
891
|
else
|
892
892
|
w = acsc_edom(z, prec);
|
@@ -895,7 +895,7 @@ solver_triginv(ID func, VALUE z, VALUE prec)
|
|
895
895
|
{
|
896
896
|
VALUE m_domain = rb_range_new(BIG_MINUS_INF, BIG_MINUS_ONE, 0);
|
897
897
|
VALUE p_domain = rb_range_new(BIG_ONE, BIG_INF, 0);
|
898
|
-
if (
|
898
|
+
if (rb_num_domain_p(m_domain, z) || rb_num_domain_p(p_domain, z))
|
899
899
|
w = asec_branch(z, prec, cb_asec);
|
900
900
|
else
|
901
901
|
w = asec_edom(z, prec);
|
@@ -1121,9 +1121,9 @@ solver_hyperbinv(ID func, VALUE z, VALUE prec)
|
|
1121
1121
|
{
|
1122
1122
|
VALUE m_domain = rb_range_new(BIG_MINUS_INF, BIG_MINUS_ONE, 0);
|
1123
1123
|
VALUE p_domain = rb_range_new(BIG_ONE, BIG_INF, 0);
|
1124
|
-
if (
|
1124
|
+
if (rb_num_domain_p(p_domain, z))
|
1125
1125
|
w = acosh_branch(z, prec, cb_acosh);
|
1126
|
-
else if (
|
1126
|
+
else if (rb_num_domain_p(m_domain, z))
|
1127
1127
|
{
|
1128
1128
|
z = rb_num_abs(z);
|
1129
1129
|
w = acosh_branch(z, prec, cb_acosh);
|
@@ -1135,7 +1135,7 @@ solver_hyperbinv(ID func, VALUE z, VALUE prec)
|
|
1135
1135
|
else if (func == mf_atanh)
|
1136
1136
|
{
|
1137
1137
|
VALUE domain = rb_range_new(INT2FIX(-1), INT2FIX(1), 0);
|
1138
|
-
if (
|
1138
|
+
if (rb_num_domain_p(domain, z))
|
1139
1139
|
w = atanh_branch(z, prec, cb_atanh);
|
1140
1140
|
else
|
1141
1141
|
w = atanh_edom(z, prec);
|
@@ -1148,9 +1148,9 @@ solver_hyperbinv(ID func, VALUE z, VALUE prec)
|
|
1148
1148
|
{
|
1149
1149
|
VALUE m_domain = rb_range_new(BIG_MINUS_ONE, BIG_ZERO, 0);
|
1150
1150
|
VALUE p_domain = rb_range_new(BIG_ZERO, BIG_ONE, 0);
|
1151
|
-
if (
|
1151
|
+
if (rb_num_domain_p(p_domain, z))
|
1152
1152
|
w = asech_branch(z, prec, cb_asech);
|
1153
|
-
else if (
|
1153
|
+
else if (rb_num_domain_p(m_domain, z))
|
1154
1154
|
{
|
1155
1155
|
w = asech_branch(z, prec, cb_asech);
|
1156
1156
|
w = rb_Complex(w, rb_bigmath_const_pi(prec));
|
@@ -1162,7 +1162,7 @@ solver_hyperbinv(ID func, VALUE z, VALUE prec)
|
|
1162
1162
|
{
|
1163
1163
|
VALUE m_domain = rb_range_new(BIG_MINUS_INF, BIG_MINUS_ONE, 0);
|
1164
1164
|
VALUE p_domain = rb_range_new(BIG_ONE, BIG_INF, 0);
|
1165
|
-
if (
|
1165
|
+
if (rb_num_domain_p(m_domain, z) || rb_num_domain_p(p_domain, z))
|
1166
1166
|
w = acoth_branch(z, prec, cb_acoth);
|
1167
1167
|
else
|
1168
1168
|
w = acoth_edom(z, prec);
|
@@ -1337,12 +1337,12 @@ __impl_bigmath_sqrt(VALUE unused_obj, VALUE z, VALUE prec)
|
|
1337
1337
|
if (rb_num_negative_p(z))
|
1338
1338
|
w = sqrt_edom(z, prec);
|
1339
1339
|
else
|
1340
|
-
w =
|
1340
|
+
w = cb_sqrt(z, prec);
|
1341
1341
|
}
|
1342
1342
|
else
|
1343
1343
|
{
|
1344
1344
|
z = rb_num_canonicalize(z, prec, ARG_COMPLEX, ARG_RAWVALUE);
|
1345
|
-
w =
|
1345
|
+
w = cb_csqrt(z, prec);
|
1346
1346
|
}
|
1347
1347
|
return w;
|
1348
1348
|
}
|
@@ -1374,16 +1374,58 @@ __impl_bigmath_cbrt(VALUE unused_obj, VALUE z, VALUE prec)
|
|
1374
1374
|
if (rb_num_real_p(z))
|
1375
1375
|
{
|
1376
1376
|
z = rb_num_canonicalize(z, prec, ARG_REAL, ARG_RAWVALUE);
|
1377
|
-
w =
|
1377
|
+
w = cb_cbrt(z, prec);
|
1378
1378
|
}
|
1379
1379
|
else
|
1380
1380
|
{
|
1381
1381
|
z = rb_num_canonicalize(z, prec, ARG_COMPLEX, ARG_RAWVALUE);
|
1382
|
-
w =
|
1382
|
+
w = cb_ccbrt(z, prec);
|
1383
1383
|
}
|
1384
1384
|
return w;
|
1385
1385
|
}
|
1386
1386
|
|
1387
|
+
/**
|
1388
|
+
* Computes error function of +z+.
|
1389
|
+
*
|
1390
|
+
* @param z [Numeric] Numerical argument
|
1391
|
+
* @param prec [Integer] Arbitrary precision
|
1392
|
+
* @return [BigDecimal] Real solution
|
1393
|
+
* @raise [ArgumentError] Occurs when +prec+ is not a positive integer.
|
1394
|
+
* @raise [TypeError] Occurs when +z+ is not a numeric class.
|
1395
|
+
* @since 0.2.1
|
1396
|
+
* @example
|
1397
|
+
* BigMathR.erf(5, 20)
|
1398
|
+
* #=> 0.99999999999846254021e0
|
1399
|
+
* BigMathR.erf(5, 40)
|
1400
|
+
* #=> 0.9999999999984625402055719651498116565146e0
|
1401
|
+
*/
|
1402
|
+
static VALUE
|
1403
|
+
__impl_bigmath_erf(VALUE unused_obj, VALUE z, VALUE prec)
|
1404
|
+
{
|
1405
|
+
return erf_branch(z, prec, cb_erf);
|
1406
|
+
}
|
1407
|
+
|
1408
|
+
/**
|
1409
|
+
* Computes complementary error function of +z+.
|
1410
|
+
*
|
1411
|
+
* @param z [Numeric] Numerical argument
|
1412
|
+
* @param prec [Integer] Arbitrary precision
|
1413
|
+
* @return [BigDecimal] Real solution
|
1414
|
+
* @raise [ArgumentError] Occurs when +prec+ is not a positive integer.
|
1415
|
+
* @raise [TypeError] Occurs when +z+ is not a numeric class.
|
1416
|
+
* @since 0.2.1
|
1417
|
+
* @example
|
1418
|
+
* BigMathR.erfc(5, 20)
|
1419
|
+
* #=> 0.153745979e-11
|
1420
|
+
* BigMathR.erfc(5, 40)
|
1421
|
+
* #=> 0.15374597944280348501883434854e-11
|
1422
|
+
*/
|
1423
|
+
static VALUE
|
1424
|
+
__impl_bigmath_erfc(VALUE unused_obj, VALUE z, VALUE prec)
|
1425
|
+
{
|
1426
|
+
return erfc_branch(z, prec, cb_erfc);
|
1427
|
+
}
|
1428
|
+
|
1387
1429
|
/**
|
1388
1430
|
* Document-module: BigMathR::Solver
|
1389
1431
|
*
|
@@ -1463,6 +1505,15 @@ InitVM_Solver(void)
|
|
1463
1505
|
cb_casech = casech_logrep;
|
1464
1506
|
cb_cacoth = cacoth_logrep;
|
1465
1507
|
|
1508
|
+
cb_sqrt = sqrt_newton;
|
1509
|
+
cb_csqrt = csqrt_formula;
|
1510
|
+
cb_cbrt = cuberoot_newton;
|
1511
|
+
cb_ccbrt = ccbrt_formula;
|
1512
|
+
|
1513
|
+
cb_erf = erf_algo911;
|
1514
|
+
cb_erfc = erfc_algo911;
|
1515
|
+
|
1516
|
+
|
1466
1517
|
rb_define_singleton_method(rb_mSolver, "exp", __impl_solver_exp, 3);
|
1467
1518
|
|
1468
1519
|
rb_define_singleton_method(rb_mBigMathR, "exp", __impl_bigmath_exp, 2);
|
@@ -1513,4 +1564,7 @@ InitVM_Solver(void)
|
|
1513
1564
|
|
1514
1565
|
rb_define_singleton_method(rb_mBigMathR, "sqrt", __impl_bigmath_sqrt, 2);
|
1515
1566
|
rb_define_singleton_method(rb_mBigMathR, "cbrt", __impl_bigmath_cbrt, 2);
|
1567
|
+
|
1568
|
+
rb_define_singleton_method(rb_mBigMathR, "erf", __impl_bigmath_erf, 2);
|
1569
|
+
rb_define_singleton_method(rb_mBigMathR, "erfc", __impl_bigmath_erfc, 2);
|
1516
1570
|
}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BigMathR
|
4
|
+
module Const
|
5
|
+
module E
|
6
|
+
module_function
|
7
|
+
# Implement by continued fraction.
|
8
|
+
#
|
9
|
+
# @example
|
10
|
+
# BigMathR::Const::E.euler(20)
|
11
|
+
# #=> 0.271828182845904523536e1
|
12
|
+
# @param prec [Integer] Arbitrary precision
|
13
|
+
# @return [BigDecimal] Constant e.
|
14
|
+
# @raise [TypeError] not an Integer
|
15
|
+
# @raise [RangeError] Zero or negative precision
|
16
|
+
def euler(prec)
|
17
|
+
raise TypeError, "precision must be in Integer" unless prec.class == Integer
|
18
|
+
raise RangeError, "Zero or negative precision" if prec <= 0
|
19
|
+
n = BigDecimal.double_fig + prec
|
20
|
+
|
21
|
+
zero = BigDecimal(0)
|
22
|
+
one = BigDecimal(1)
|
23
|
+
two = BigDecimal(2)
|
24
|
+
|
25
|
+
c = one
|
26
|
+
b = one
|
27
|
+
p1 = one; q1 = zero; p2 = two; q2 = one;
|
28
|
+
i = one
|
29
|
+
loop do
|
30
|
+
prev = p2
|
31
|
+
t = p1 * c + p2 * b; p1 = p2; p2 = t;
|
32
|
+
t = q1 * c + q2 * b; q1 = q2; q2 = t;
|
33
|
+
if q2.nonzero?
|
34
|
+
p1 = p1.div(q2, n); q1 = q1.div(q2, n); p2 = p2.div(q2, n); q2 = one;
|
35
|
+
end
|
36
|
+
i += one
|
37
|
+
c = one
|
38
|
+
b = (i + one) % 3 == 0 ? ((i.to_i.succ) / 3) * two : one
|
39
|
+
break unless q2.nonzero? && prev != p2
|
40
|
+
end
|
41
|
+
p2.round(prec)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
data/lib/bigdecimal/math_r.rb
CHANGED
@@ -4,6 +4,7 @@ require 'bigdecimal/math'
|
|
4
4
|
require_relative './math_r.so'
|
5
5
|
|
6
6
|
require_relative 'math_r/version'
|
7
|
+
require_relative 'math_r/const/E_euler'
|
7
8
|
require_relative 'math_r/const/PI_chudnovsky'
|
8
9
|
require_relative 'math_r/const/PI_euler'
|
9
10
|
require_relative 'math_r/const/PI_ramanujan1'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bigdecimal-math_r
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tribusonz-2
|
@@ -27,16 +27,16 @@ dependencies:
|
|
27
27
|
name: rake
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
29
29
|
requirements:
|
30
|
-
- - "
|
30
|
+
- - "~>"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '0'
|
32
|
+
version: '13.0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
35
|
version_requirements: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
-
- - "
|
37
|
+
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '0'
|
39
|
+
version: '13.0'
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: rake-compiler
|
42
42
|
requirement: !ruby/object:Gem::Requirement
|
@@ -59,10 +59,8 @@ extensions:
|
|
59
59
|
- ext/bigdecimal/math_r/extconf.rb
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
|
-
- ".ruby-version"
|
63
62
|
- CODE_OF_CONDUCT.md
|
64
63
|
- LICENSE
|
65
|
-
- LICENSE.txt
|
66
64
|
- README.md
|
67
65
|
- Rakefile
|
68
66
|
- changelog.md
|
@@ -88,6 +86,7 @@ files:
|
|
88
86
|
- ext/bigdecimal/math_r/api/bigmath/clog.h
|
89
87
|
- ext/bigdecimal/math_r/api/bigmath/const.h
|
90
88
|
- ext/bigdecimal/math_r/api/bigmath/const_e.h
|
89
|
+
- ext/bigdecimal/math_r/api/bigmath/const_euler_gamma.h
|
91
90
|
- ext/bigdecimal/math_r/api/bigmath/const_log10.h
|
92
91
|
- ext/bigdecimal/math_r/api/bigmath/const_log2.h
|
93
92
|
- ext/bigdecimal/math_r/api/bigmath/const_log_pi.h
|
@@ -118,6 +117,7 @@ files:
|
|
118
117
|
- ext/bigdecimal/math_r/api/numeric/abs.h
|
119
118
|
- ext/bigdecimal/math_r/api/numeric/canonicalize.h
|
120
119
|
- ext/bigdecimal/math_r/api/numeric/cmpeql.h
|
120
|
+
- ext/bigdecimal/math_r/api/numeric/domain_p.h
|
121
121
|
- ext/bigdecimal/math_r/api/numeric/equal_p.h
|
122
122
|
- ext/bigdecimal/math_r/api/numeric/finite_p.h
|
123
123
|
- ext/bigdecimal/math_r/api/numeric/imag.h
|
@@ -140,9 +140,10 @@ files:
|
|
140
140
|
- ext/bigdecimal/math_r/euler_f.c
|
141
141
|
- ext/bigdecimal/math_r/exp.c
|
142
142
|
- ext/bigdecimal/math_r/extconf.rb
|
143
|
-
- ext/bigdecimal/math_r/
|
143
|
+
- ext/bigdecimal/math_r/gamma_beta.c
|
144
144
|
- ext/bigdecimal/math_r/hyperb.c
|
145
|
-
- ext/bigdecimal/math_r/internal/algo/bigmath/E/
|
145
|
+
- ext/bigdecimal/math_r/internal/algo/bigmath/E/napier.h
|
146
|
+
- ext/bigdecimal/math_r/internal/algo/bigmath/EulerGamma/borwein_bailey.h
|
146
147
|
- ext/bigdecimal/math_r/internal/algo/bigmath/LOG10/ser.h
|
147
148
|
- ext/bigdecimal/math_r/internal/algo/bigmath/LOG2/BBP2002.h
|
148
149
|
- ext/bigdecimal/math_r/internal/algo/bigmath/LOG_PI/builtin.h
|
@@ -213,6 +214,7 @@ files:
|
|
213
214
|
- ext/bigdecimal/math_r/internal/algo/bigmath/catan/logrep.h
|
214
215
|
- ext/bigdecimal/math_r/internal/algo/bigmath/catanh/branch.h
|
215
216
|
- ext/bigdecimal/math_r/internal/algo/bigmath/catanh/logrep.h
|
217
|
+
- ext/bigdecimal/math_r/internal/algo/bigmath/ccbrt/branch.h
|
216
218
|
- ext/bigdecimal/math_r/internal/algo/bigmath/ccbrt/formula.h
|
217
219
|
- ext/bigdecimal/math_r/internal/algo/bigmath/ccos/branch.h
|
218
220
|
- ext/bigdecimal/math_r/internal/algo/bigmath/ccos/eulerf.h
|
@@ -230,10 +232,14 @@ files:
|
|
230
232
|
- ext/bigdecimal/math_r/internal/algo/bigmath/cexp/eulerf.h
|
231
233
|
- ext/bigdecimal/math_r/internal/algo/bigmath/cexp2/branch.h
|
232
234
|
- ext/bigdecimal/math_r/internal/algo/bigmath/cexp2/eulerf.h
|
235
|
+
- ext/bigdecimal/math_r/internal/algo/bigmath/cexpm1/branch.h
|
236
|
+
- ext/bigdecimal/math_r/internal/algo/bigmath/cexpm1/identity.h
|
233
237
|
- ext/bigdecimal/math_r/internal/algo/bigmath/clog/branch.h
|
234
238
|
- ext/bigdecimal/math_r/internal/algo/bigmath/clog/formula.h
|
239
|
+
- ext/bigdecimal/math_r/internal/algo/bigmath/clog10/branch.h
|
235
240
|
- ext/bigdecimal/math_r/internal/algo/bigmath/clog10/formula.h
|
236
241
|
- ext/bigdecimal/math_r/internal/algo/bigmath/clog1p/branch.h
|
242
|
+
- ext/bigdecimal/math_r/internal/algo/bigmath/clog2/branch.h
|
237
243
|
- ext/bigdecimal/math_r/internal/algo/bigmath/clog2/formula.h
|
238
244
|
- ext/bigdecimal/math_r/internal/algo/bigmath/cos/branch.h
|
239
245
|
- ext/bigdecimal/math_r/internal/algo/bigmath/cos/eulerf.h
|
@@ -265,11 +271,13 @@ files:
|
|
265
271
|
- ext/bigdecimal/math_r/internal/algo/bigmath/csin/eulerf.h
|
266
272
|
- ext/bigdecimal/math_r/internal/algo/bigmath/csinh/branch.h
|
267
273
|
- ext/bigdecimal/math_r/internal/algo/bigmath/csinh/eulerf.h
|
274
|
+
- ext/bigdecimal/math_r/internal/algo/bigmath/csqrt/branch.h
|
268
275
|
- ext/bigdecimal/math_r/internal/algo/bigmath/csqrt/formula.h
|
269
276
|
- ext/bigdecimal/math_r/internal/algo/bigmath/ctan/branch.h
|
270
277
|
- ext/bigdecimal/math_r/internal/algo/bigmath/ctan/eulerf.h
|
271
278
|
- ext/bigdecimal/math_r/internal/algo/bigmath/ctanh/branch.h
|
272
279
|
- ext/bigdecimal/math_r/internal/algo/bigmath/ctanh/eulerf.h
|
280
|
+
- ext/bigdecimal/math_r/internal/algo/bigmath/cuberoot/branch.h
|
273
281
|
- ext/bigdecimal/math_r/internal/algo/bigmath/cuberoot/newton.h
|
274
282
|
- ext/bigdecimal/math_r/internal/algo/bigmath/erf/algo911.h
|
275
283
|
- ext/bigdecimal/math_r/internal/algo/bigmath/erf/branch.h
|
@@ -285,6 +293,8 @@ files:
|
|
285
293
|
- ext/bigdecimal/math_r/internal/algo/bigmath/exp/edf.h
|
286
294
|
- ext/bigdecimal/math_r/internal/algo/bigmath/exp2/branch.h
|
287
295
|
- ext/bigdecimal/math_r/internal/algo/bigmath/exp2/edf.h
|
296
|
+
- ext/bigdecimal/math_r/internal/algo/bigmath/expm1/branch.h
|
297
|
+
- ext/bigdecimal/math_r/internal/algo/bigmath/expm1/identity.h
|
288
298
|
- ext/bigdecimal/math_r/internal/algo/bigmath/expxt/edf.h
|
289
299
|
- ext/bigdecimal/math_r/internal/algo/bigmath/f_euler/formula.h
|
290
300
|
- ext/bigdecimal/math_r/internal/algo/bigmath/hypot/branch.h
|
@@ -356,7 +366,7 @@ files:
|
|
356
366
|
- ext/bigdecimal/math_r/solver.c
|
357
367
|
- ext/bigdecimal/math_r/trig.c
|
358
368
|
- lib/bigdecimal/math_r.rb
|
359
|
-
- lib/bigdecimal/math_r.
|
369
|
+
- lib/bigdecimal/math_r/const/E_euler.rb
|
360
370
|
- lib/bigdecimal/math_r/const/EulerGamma_engel.rb
|
361
371
|
- lib/bigdecimal/math_r/const/LOG2_bbp2007.rb
|
362
372
|
- lib/bigdecimal/math_r/const/PI_chudnovsky.rb
|
@@ -387,7 +397,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
387
397
|
- !ruby/object:Gem::Version
|
388
398
|
version: '0'
|
389
399
|
requirements: []
|
390
|
-
rubygems_version: 3.
|
400
|
+
rubygems_version: 3.7.2
|
391
401
|
specification_version: 4
|
392
402
|
summary: Refined Math for BigDecimal
|
393
403
|
test_files: []
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
3.4.3
|
data/LICENSE.txt
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2025 tribusonz-2
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
13
|
-
all copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE.
|
data/lib/bigdecimal/math_r.so
DELETED
Binary file
|