| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
* math.c (math_lgamma): check the argument before calling math
function `lgamma_r` for edge cases.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* math.c (math_gamma): check the argument before calling math
function `tgamma` for edge cases.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
| |
* configure.in: do not use buggy tgamma() of mingw.
* missing/tgamma.c (tgamma): merge fix for inifity from
ruby_tgamma. since msvcr120.dll and later have tgamma, this
implementation will not be used.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* math.c (tgamma): it seems that the implementaion of mswin has similar problem
with mingw.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
* math.c: [DOC] mention Integer.sqrt in docs for Math.sqrt.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* math.c: [DOC] mention possibly surprising behavior of Math.sqrt
due to floating point arithmetic; also refer to BigDecimal#sqrt.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* math.c (math_log10): calculate log10(2) for more accuracy.
[ruby-core:79907] [Bug #13279]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* math.c (exp1, exp2): use immediate 0 instead of rb_mMath, which
is never used.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* math.c (ifdef M_PI): M_PI is eventually defined in missing.h even if math.h
doesn't supply it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
* numeric.c: [DOC] update document for Integer class.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* math.c (tanh): make faster by the extract form if three
hyperbolic functions are unavailable. [Feature #12647]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
* math.c (tanh): check overflows, and return +-1.0.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
| |
because internal.h includes ruby.h, ruby.h includes win32.h, and
win32.h includes system's math.h.
this change is to get rid of a compiler warning (redefinition of
a macro) introduced at r55641.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* math.c (rb_math_sqrt): [EXPERIMENTAL] move Complex sqrt support
from mathn.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* math.c (get_double_rshift): extract bignum to double conversion
with bit offset.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* math.c (math_log1, math_log10): use common math constants
instead of math function calls.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
returns positive infinity, in addition to lgamma_r(-0.0).
AIX returns an incorrect result of negative infinity.
* math.c (ruby_lgamma_r): handle +0.0, in addition to -0.0.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* configure.in (rb_cv_lgamma_r_m0): check if lgamma_r(-0.0)
returns negative infinity. [Bug #12249]
* math.c (ruby_lgamma_r): define by the configured result.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
* math.c (ruby_lgamma_r): missing/lgamma_r.c is used on Windows,
since msvcrt does not provide it.
* missing/lgamma_r.c (lgamma_r): fix lgamma(-0.0).
[ruby-core:74823] [Bug #12249]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
cf. [Bug #12249]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
* math.c (ruby_lgamma_r): fix lgamma(-0.0) on mingw and OSX.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* math.c (ruby_tgamma): fix tgamma(-0.0) on mingw.
[ruby-core:74817] [Bug #12249]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
* object.c (rb_num_to_dbl): move from num2dbl_with_to_f in math.c.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* include/ruby/missing.h (M_PI, M_PI_2): fallback definitions for
VC6.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
and tests for this.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
* math.c (math_gamma): make more robust against addition/removal.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
specify the size of the fact_table.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* math.c (mingw_tgamma): tgamma(3) on mingw returns a NaN for a
big number, not infinity.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
appearance.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
[Feature #10909]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* math.c (num2dbl_with_to_f): make faster when Bignum passed by
direct conversion using rb_big2dbl(). [Feature #10800]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* math.c (Get_Double): restrict direct casting only when
Fixnum#to_f is not redefined, and convert with rb_to_float().
[Feature #10785]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* math.c (Get_Double): direct casting from Fixnum to double.
[Feature #10785]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
http://d.hatena.ne.jp/nagachika/20150112/ruby_trunk_changes_49213_49226
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
[Feature #10323][ruby-core:65400][ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
includable without prior inclusion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* include/ruby/intern.h: constify `argv` parameters.
* include/ruby/ruby.h: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* configure.in (rb_cv_atan2_inf_c99): check whether runtime atan2
handles Inf as C99. ruby-core:62536] [Bug #9831]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
anyway.
* internal.h: follows the above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* math.c (math_atan2): return values like as expected by C99 if
both two arguments are infinity. based on the patch by cremno
phobia <cremno AT mail.ru> in [ruby-core:62310]. [Feature #9799]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
* math.c (math_log): check domain of base argument too. raises
Math::DomainError instead of returning NaN if the base is less
than 0, and returns NaN instead of -infinity if both of two
arguments are 0. [ruby-core:62309] [Bug #9797]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
* math.c (math_log): adjust prototype as method function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(BIGNUM_EMBED_LEN_NUMBITS): Renamed from RBIGNUM_EMBED_LEN_NUMBITS.
(BIGNUM_EMBED_LEN_MAX): Renamed from RBIGNUM_EMBED_LEN_MAX.
(BIGNUM_SIGN_BIT): Renamed from RBIGNUM_SIGN_BIT.
(BIGNUM_SIGN): Renamed from RBIGNUM_SIGN.
(BIGNUM_SET_SIGN): Renamed from RBIGNUM_SET_SIGN.
(BIGNUM_POSITIVE_P): Renamed from RBIGNUM_POSITIVE_P.
(BIGNUM_NEGATIVE_P): Renamed from RBIGNUM_NEGATIVE_P.
(BIGNUM_EMBED_FLAG): Renamed from RBIGNUM_EMBED_FLAG.
(BIGNUM_EMBED_LEN_MASK): Renamed from RBIGNUM_EMBED_LEN_MASK.
(BIGNUM_EMBED_LEN_SHIFT): Renamed from RBIGNUM_EMBED_LEN_SHIFT.
(BIGNUM_LEN): Renamed from RBIGNUM_LEN.
(RBIGNUM_DIGITS): Renamed from RBIGNUM_DIGITS.
(BIGNUM_LENINT): Renamed from RBIGNUM_LENINT.
* bignum.c: Follow the above change.
* gc.c: Ditto.
* marshal.c: Ditto.
* math.c: Ditto.
* numeric.c: Ditto.
* random.c: Ditto.
* rational.c: Ditto.
* sprintf.c: Ditto.
* ext/-test-/bignum/bigzero.c: Ditto.
* ext/-test-/bignum/intpack.c: Ditto.
* ext/bigdecimal/bigdecimal.c: Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|