| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
[Misc #18891]
|
|
|
|
|
|
| |
Revises intro.
Adds "What's Here".
Revises methods doc.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
* Move f_boolcast definination
* Remove f_boolcast macro defination
* to
|
| |
|
| |
|
|
|
|
|
|
| |
This should return 0, but on glibc it returned NaN.
Fixes [Bug #17804]
|
| |
|
|
|
|
| |
To fix build failures.
|
|
|
|
| |
This shall fix compile errors.
|
|
|
| |
Split ruby.h
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Saves comitters' daily life by avoid #include-ing everything from
internal.h to make each file do so instead. This would significantly
speed up incremental builds.
We take the following inclusion order in this changeset:
1. "ruby/config.h", where _GNU_SOURCE is defined (must be the very
first thing among everything).
2. RUBY_EXTCONF_H if any.
3. Standard C headers, sorted alphabetically.
4. Other system headers, maybe guarded by #ifdef
5. Everything else, sorted alphabetically.
Exceptions are those win32-related headers, which tend not be self-
containing (headers have inclusion order dependencies).
|
| |
|
|
|
|
|
|
|
| |
These functions are used from within a compilation unit so we can
make them static, for better binary size. This changeset reduces
the size of generated ruby binary from 26,590,128 bytes to
26,584,472 bytes on my macihne.
|
|
|
|
| |
When searching for this constant, I landed on the correct page https://ruby-doc.org/core-2.6.4/Math.html however I was using CMD+f to search for "Euler" and did not find it. If we add the full name for this constant then it will be easier to search for and find.
|
|
|
|
|
|
|
| |
* math.c (math_cbrt): refine the approximation result on boundary
values by an iteration of Newton-Raphson method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* math.c (math_log, rb_math_log): inverted calling order, to
remove unused argument.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
| |
It seems HUGE_VAL is already used. Why not eliminate INTINITY.
NAN is also float. That of double is called nan(). This is also
fixed.
Signed-off-by: Urabe, Shyouhei <shyouhei@ruby-lang.org>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* 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
|