mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 13:04:13 +02:00
merge revision(s) 56550:
* ext/bigdecimal/bigdecimal.c: Import changes from ruby/bigdecimal repository. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@56562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ded4039231
commit
d56ccddb31
3 changed files with 96 additions and 93 deletions
|
@ -1,3 +1,8 @@
|
|||
Sat Nov 5 11:16:58 2016 Kenta Murata <mrkn@mrkn.jp>
|
||||
|
||||
* ext/bigdecimal/bigdecimal.c: Import changes from ruby/bigdecimal
|
||||
repository.
|
||||
|
||||
Tue Oct 18 02:58:22 2016 Kazuki Yamaguchi <k@rhe.jp>
|
||||
|
||||
* eval_intern.h (TH_PUSH_TAG): Initialize struct rb_vm_tag::tag with
|
||||
|
|
|
@ -2533,7 +2533,7 @@ BigDecimal_initialize(int argc, VALUE *argv, VALUE self)
|
|||
|
||||
/* :nodoc:
|
||||
*
|
||||
* private method to dup and clone the provided BigDecimal +other+
|
||||
* private method for dup and clone the provided BigDecimal +other+
|
||||
*/
|
||||
static VALUE
|
||||
BigDecimal_initialize_copy(VALUE self, VALUE other)
|
||||
|
@ -2769,7 +2769,7 @@ BigMath_s_exp(VALUE klass, VALUE x, VALUE vprec)
|
|||
rb_raise(rb_eArgError, "Zero or negative precision for exp");
|
||||
}
|
||||
|
||||
/* TODO: the following switch statement is almostly the same as one in the
|
||||
/* TODO: the following switch statement is almost same as one in the
|
||||
* BigDecimalCmp function. */
|
||||
switch (TYPE(x)) {
|
||||
case T_DATA:
|
||||
|
@ -2907,7 +2907,7 @@ BigMath_s_log(VALUE klass, VALUE x, VALUE vprec)
|
|||
rb_raise(rb_eArgError, "Zero or negative precision for exp");
|
||||
}
|
||||
|
||||
/* TODO: the following switch statement is almostly the same as one in the
|
||||
/* TODO: the following switch statement is almost same as one in the
|
||||
* BigDecimalCmp function. */
|
||||
switch (TYPE(x)) {
|
||||
case T_DATA:
|
||||
|
@ -3135,9 +3135,8 @@ get_vp_value:
|
|||
*
|
||||
* Copyright (C) 2002 by Shigeo Kobayashi <shigeo@tinyforest.gr.jp>.
|
||||
*
|
||||
* You may distribute under the terms of either the GNU General Public
|
||||
* License or the Artistic License, as specified in the README file
|
||||
* of the BigDecimal distribution.
|
||||
* BigDecimal is released under the Ruby and 2-clause BSD licenses.
|
||||
* See LICENSE.txt for details.
|
||||
*
|
||||
* Maintained by mrkn <mrkn@mrkn.jp> and ruby-core members.
|
||||
*
|
||||
|
@ -3946,6 +3945,10 @@ VpAlloc(size_t mx, const char *szVal)
|
|||
i = 0;
|
||||
ipn = 0;
|
||||
while ((psz[i] = szVal[ipn]) != 0) {
|
||||
if (ISSPACE(psz[i])) {
|
||||
psz[i] = 0;
|
||||
break;
|
||||
}
|
||||
if (ISDIGIT(psz[i])) ++ni;
|
||||
if (psz[i] == '_') {
|
||||
if (ni > 0) {
|
||||
|
@ -3958,11 +3961,6 @@ VpAlloc(size_t mx, const char *szVal)
|
|||
++i;
|
||||
++ipn;
|
||||
}
|
||||
/* Skip trailing spaces */
|
||||
while (--i > 0) {
|
||||
if (ISSPACE(psz[i])) psz[i] = 0;
|
||||
else break;
|
||||
}
|
||||
szVal = psz;
|
||||
|
||||
/* Check on Inf & NaN */
|
||||
|
@ -4099,7 +4097,7 @@ VpAsgn(Real *c, Real *a, int isw)
|
|||
|
||||
/*
|
||||
* c = a + b when operation = 1 or 2
|
||||
* = a - b when operation = -1 or -2.
|
||||
* c = a - b when operation = -1 or -2.
|
||||
* Returns number of significant digits of c
|
||||
*/
|
||||
VP_EXPORT size_t
|
||||
|
@ -4232,7 +4230,7 @@ end_if:
|
|||
}
|
||||
|
||||
/*
|
||||
* Addition of two variable precisional variables
|
||||
* Addition of two values with variable precision
|
||||
* a and b assuming abs(a)>abs(b).
|
||||
* c = abs(a) + abs(b) ; where |a|>=|b|
|
||||
*/
|
||||
|
@ -4991,7 +4989,7 @@ VpComp(Real *a, Real *b)
|
|||
goto Exit;
|
||||
}
|
||||
|
||||
/* a and b have same exponent, then compare significand. */
|
||||
/* a and b have same exponent, then compare their significand. */
|
||||
mx = (a->Prec < b->Prec) ? a->Prec : b->Prec;
|
||||
ind = 0;
|
||||
while (ind < mx) {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#define RUBY_VERSION "2.3.2"
|
||||
#define RUBY_RELEASE_DATE "2016-10-18"
|
||||
#define RUBY_PATCHLEVEL 200
|
||||
#define RUBY_RELEASE_DATE "2016-11-05"
|
||||
#define RUBY_PATCHLEVEL 201
|
||||
|
||||
#define RUBY_RELEASE_YEAR 2016
|
||||
#define RUBY_RELEASE_MONTH 10
|
||||
#define RUBY_RELEASE_DAY 18
|
||||
#define RUBY_RELEASE_MONTH 11
|
||||
#define RUBY_RELEASE_DAY 5
|
||||
|
||||
#include "ruby/version.h"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue