Ruby 2.0.0p353(2013-11-22revision43784)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Macros | Functions | Variables
bigdecimal.c File Reference
`#include "bigdecimal.h"`
`#include <assert.h>`
`#include <ctype.h>`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <errno.h>`
`#include <math.h>`
Include dependency graph for bigdecimal.c:

Go to the source code of this file.

## Macros
#define | NDEBUG
#define | ENTER(n) volatile VALUE RB_UNUSED_VAR(vStack[n]);int iStack=0
#define | PUSH(x) vStack[iStack++] = (VALUE)(x);
#define | SAVE(p) PUSH(p->obj);
#define | GUARD_OBJ(p, y) {p=y;SAVE(p);}
#define | BASE_FIG RMPD_COMPONENT_FIGURES
#define | BASE RMPD_BASE
#define | HALF_BASE (BASE/2)
#define | BASE1 (BASE/10)
#define | DBLE_FIG (DBL_DIG+1) /* figure of double */
#define | RBIGNUM_ZERO_P(x)
#define | RRATIONAL_ZERO_P(x)
#define | RRATIONAL_NEGATIVE_P(x) RTEST(rb_funcall((x), '<', 1, INT2FIX(0)))
#define | DoSomeOne(x, y, f) rb_num_coerce_bin(x,y,f)
#define | VpAllocReal(prec) (Real *)VpMemAlloc(offsetof(Real, frac) + (prec) * sizeof(BDIGIT))
#define | VpReallocReal(ptr, prec) (Real *)VpMemRealloc((ptr), offsetof(Real, frac) + (prec) * sizeof(BDIGIT))
#define | BigMath_exp(x, n) BigMath_s_exp(rb_mBigMath, (x), (n))
#define | BigMath_log(x, n) BigMath_s_log(rb_mBigMath, (x), (n))
#define | is_positive(x) (!is_negative(x))
#define | maxnr 100UL /* Maximum iterations for calcurating sqrt. */
#define | MemCmp(x, y, z) memcmp(x,y,z)
#define | StrCmp(x, y) strcmp(x,y)
#define | rmpd_set_thread_local_exception_mode(mode)
#define | rmpd_set_thread_local_precision_limit(limit)
#define | RMPD_PRECISION_LIMIT_DEFAULT ((size_t)0)
#define | rmpd_set_thread_local_rounding_mode(mode)

## Functions
static int | bigzero_p (VALUE x)
static VALUE | BigDecimal_version (VALUE self)
static unsigned short | VpGetException (void)
static void | VpSetException (unsigned short f)
static void | VpInternalRound (Real *c, size_t ixDigit, BDIGIT vPrev, BDIGIT v)
static int | VpLimitRound (Real *c, size_t ixDigit)
static Real * | VpCopy (Real *pv, Real const *const x)
static void | BigDecimal_delete (void *pv)
static size_t | BigDecimal_memsize (const void *ptr)
static int | is_kind_of_BigDecimal (VALUE const v)
static VALUE | ToValue (Real *p)
| NORETURN (static void cannot_be_coerced_into_BigDecimal(VALUE, VALUE))
static void | cannot_be_coerced_into_BigDecimal (VALUE exc_class, VALUE v)
static VALUE | BigDecimal_div2 (int, VALUE *, VALUE)
static Real * | GetVpValueWithPrec (VALUE v, long prec, int must)
static Real * | GetVpValue (VALUE v, int must)
static VALUE | BigDecimal_double_fig (VALUE self)
static VALUE | BigDecimal_prec (VALUE self)
static VALUE | BigDecimal_hash (VALUE self)
static VALUE | BigDecimal_dump (int argc, VALUE *argv, VALUE self)
static VALUE | BigDecimal_load (VALUE self, VALUE str)
static unsigned short | check_rounding_mode (VALUE const v)
static VALUE | BigDecimal_mode (int argc, VALUE *argv, VALUE self)
static size_t | GetAddSubPrec (Real *a, Real *b)
static SIGNED_VALUE | GetPositiveInt (VALUE v)
VP_EXPORT Real * | VpNewRbClass (size_t mx, const char *str, VALUE klass)
VP_EXPORT Real * | VpCreateRbObject (size_t mx, const char *str)
static VALUE | BigDecimal_IsNaN (VALUE self)
static VALUE | BigDecimal_IsInfinite (VALUE self)
static VALUE | BigDecimal_IsFinite (VALUE self)
static void | BigDecimal_check_num (Real *p)
static VALUE | BigDecimal_split (VALUE self)
static VALUE | BigDecimal_to_i (VALUE self)
static VALUE | BigDecimal_to_f (VALUE self)
static VALUE | BigDecimal_to_r (VALUE self)
static VALUE | BigDecimal_coerce (VALUE self, VALUE other)
static VALUE | BigDecimal_uplus (VALUE self)
static VALUE | BigDecimal_add (VALUE self, VALUE r)
static VALUE | BigDecimal_sub (VALUE self, VALUE r)
static VALUE | BigDecimalCmp (VALUE self, VALUE r, char op)
static VALUE | BigDecimal_zero (VALUE self)
static VALUE | BigDecimal_nonzero (VALUE self)
static VALUE | BigDecimal_comp (VALUE self, VALUE r)
static VALUE | BigDecimal_eq (VALUE self, VALUE r)
static VALUE | BigDecimal_lt (VALUE self, VALUE r)
static VALUE | BigDecimal_le (VALUE self, VALUE r)
static VALUE | BigDecimal_gt (VALUE self, VALUE r)
static VALUE | BigDecimal_ge (VALUE self, VALUE r)
static VALUE | BigDecimal_neg (VALUE self)
static VALUE | BigDecimal_mult (VALUE self, VALUE r)
| GUARD_OBJ (a, GetVpValue(self, 1))
| if (RB_TYPE_P(r, T_FLOAT))
else | if (RB_TYPE_P(r, T_RATIONAL))
| if (!b) return DoSomeOne(self
| SAVE (b)
| if (mx< b->Prec+vabs(b->exponent)) mx
| GUARD_OBJ ((*c), VpCreateRbObject(mx,"#0"))
| GUARD_OBJ ((*res), VpCreateRbObject((mx+1)*2+(VpBaseFig()+1),"#0"))
| return (VALUE) 0
| if (r!=(VALUE) 0)
return | ToValue (c)
static VALUE | BigDecimal_DoDivmod (VALUE self, VALUE r, Real **div, Real **mod)
static VALUE | BigDecimal_mod (VALUE self, VALUE r)
static VALUE | BigDecimal_divremain (VALUE self, VALUE r, Real **dv, Real **rv)
static VALUE | BigDecimal_remainder (VALUE self, VALUE r)
static VALUE | BigDecimal_divmod (VALUE self, VALUE r)
static VALUE | BigDecimal_add2 (VALUE self, VALUE b, VALUE n)
static VALUE | BigDecimal_sub2 (VALUE self, VALUE b, VALUE n)
static VALUE | BigDecimal_mult2 (VALUE self, VALUE b, VALUE n)
static VALUE | BigDecimal_abs (VALUE self)
static VALUE | BigDecimal_sqrt (VALUE self, VALUE nFig)
static VALUE | BigDecimal_fix (VALUE self)
static VALUE | BigDecimal_round (int argc, VALUE *argv, VALUE self)
static VALUE | BigDecimal_truncate (int argc, VALUE *argv, VALUE self)
static VALUE | BigDecimal_frac (VALUE self)
static VALUE | BigDecimal_floor (int argc, VALUE *argv, VALUE self)
static VALUE | BigDecimal_ceil (int argc, VALUE *argv, VALUE self)
static VALUE | BigDecimal_to_s (int argc, VALUE *argv, VALUE self)
static VALUE | BigDecimal_exponent (VALUE self)
static VALUE | BigDecimal_inspect (VALUE self)
static VALUE | BigMath_s_exp (VALUE, VALUE, VALUE)
static VALUE | BigMath_s_log (VALUE, VALUE, VALUE)
static int | is_integer (VALUE x)
static int | is_negative (VALUE x)
static int | is_zero (VALUE x)
static int | is_one (VALUE x)
static int | is_even (VALUE x)
static VALUE | rmpd_power_by_big_decimal (Real const *x, Real const *exp, ssize_t const n)
static VALUE | BigDecimal_power (int argc, VALUE *argv, VALUE self)
static VALUE | BigDecimal_power_op (VALUE self, VALUE exp)
static VALUE | BigDecimal_s_allocate (VALUE klass)
static Real * | BigDecimal_new (int argc, VALUE *argv)
static VALUE | BigDecimal_initialize (int argc, VALUE *argv, VALUE self)
static VALUE | BigDecimal_initialize_copy (VALUE self, VALUE other)
static VALUE | BigDecimal_global_new (int argc, VALUE *argv, VALUE self)
static VALUE | BigDecimal_limit (int argc, VALUE *argv, VALUE self)
static VALUE | BigDecimal_sign (VALUE self)
static VALUE | BigDecimal_save_exception_mode (VALUE self)
static VALUE | BigDecimal_save_rounding_mode (VALUE self)
static VALUE | BigDecimal_save_limit (VALUE self)
void | Init_bigdecimal (void)
static int | VpIsDefOP (Real *c, Real *a, Real *b, int sw)
static int | AddExponent (Real *a, SIGNED_VALUE n)
static BDIGIT | VpAddAbs (Real *a, Real *b, Real *c)
static BDIGIT | VpSubAbs (Real *a, Real *b, Real *c)
static size_t | VpSetPTR (Real *a, Real *b, Real *c, size_t *a_pos, size_t *b_pos, size_t *c_pos, BDIGIT *av, BDIGIT *bv)
static int | VpNmlz (Real *a)
static void | VpFormatSt (char *psz, size_t fFmt)
static int | VpRdup (Real *m, size_t ind_m)
VP_EXPORT void * | VpMemAlloc (size_t mb)
VP_EXPORT void * | VpMemRealloc (void *ptr, size_t mb)
VP_EXPORT void | VpFree (Real *pv)
VP_EXPORT size_t | VpGetPrecLimit (void)
VP_EXPORT size_t | VpSetPrecLimit (size_t n)
VP_EXPORT unsigned short | VpGetRoundMode (void)
VP_EXPORT int | VpIsRoundMode (unsigned short n)
VP_EXPORT unsigned short | VpSetRoundMode (unsigned short n)
static double | Zero (void)
static double | One (void)
VP_EXPORT double | VpGetDoubleNaN (void)
VP_EXPORT double | VpGetDoublePosInf (void)
VP_EXPORT double | VpGetDoubleNegInf (void)
VP_EXPORT double | VpGetDoubleNegZero (void)
VP_EXPORT int | VpException (unsigned short f, const char *str, int always)
VP_EXPORT size_t | VpNumOfChars (Real *vp, const char *pszFmt)
VP_EXPORT size_t | VpInit (BDIGIT BaseVal)
VP_EXPORT Real * | VpOne (void)
VP_EXPORT Real * | VpAlloc (size_t mx, const char *szVal)
VP_EXPORT size_t | VpAsgn (Real *c, Real *a, int isw)
VP_EXPORT size_t | VpAddSub (Real *c, Real *a, Real *b, int operation)
VP_EXPORT size_t | VpMult (Real *c, Real *a, Real *b)
VP_EXPORT size_t | VpDivd (Real *c, Real *r, Real *a, Real *b)
VP_EXPORT int | VpComp (Real *a, Real *b)
VP_EXPORT ssize_t | VpExponent10 (Real *a)
VP_EXPORT void | VpSzMantissa (Real *a, char *psz)
| if (VpToSpecialString(a, psz, fPlus))
| while (a->frac[0]/shift==0)
| while (sprintf(psz[-1]=='0')
VP_EXPORT int | VpCtoV (Real *a, const char *int_chr, size_t ni, const char *frac, size_t nf, const char *exp_chr, size_t ne)
VP_EXPORT int | VpVtoD (double *d, SIGNED_VALUE *e, Real *m)
VP_EXPORT void | VpDtoV (Real *m, double d)
VP_EXPORT int | VpSqrt (Real *y, Real *x)
| if (nf< 0)
| if ((size_t) ix >=y->Prec) return 0
| for (v/=shifter=1)
| memset (y->frac+ix+1, 0,(y->Prec-(ix+1))*sizeof(BDIGIT))
| switch (f)
| for (i=0;i<=n;++i)
| VpNmlz (y)
| if (exptoadd > 0)
| if (!VpHasVal(y)) return 0
| while ((v/=10)!=0)
VP_EXPORT void | VpFrac (Real *y, Real *x)
VP_EXPORT int | VpPower (Real *y, Real *x, SIGNED_VALUE n)

## Variables
VALUE | rb_cBigDecimal
VALUE | rb_mBigMath
static ID | id_BigDecimal_exception_mode
static ID | id_BigDecimal_rounding_mode
static ID | id_BigDecimal_precision_limit
static ID | id_up
static ID | id_down
static ID | id_truncate
static ID | id_half_up
static ID | id_default
static ID | id_half_down
static ID | id_half_even
static ID | id_banker
static ID | id_ceiling
static ID | id_ceil
static ID | id_floor
static ID | id_to_r
static ID | id_eq
static const rb_data_type_t | BigDecimal_data_type
static | VALUE
Real * | a = NULL
Real * | b = in[1]
size_t | mx = a->Prec + vabs(a->exponent)
| else
| r = BigDecimal_divide(&c, &res, &div, self, r)
* | div = b
VpDivd * | c =NULL
Real * | res =NULL
static Real * | VpConstOne
static Real * | VpPt5
volatile const double | gZero_ABCED9B1_CE73__00400511F31D = 0.0
volatile const double | gOne_ABCED9B4_CE73__00400511F31D = 1.0
VP_EXPORT | int
VP_EXPORT | void
BDIGIT | shift = BASE1
BDIGIT | m
BDIGIT | e
BDIGIT | nn
char * | pszSav = psz
ssize_t | ex = a->exponent * (ssize_t)BASE_FIG
ssize_t | n = (ssize_t)BASE_FIG - ioffset - 1
ssize_t | i
ssize_t | ix = nf / (ssize_t)BASE_FIG
ssize_t | ioffset = nf - ix*(ssize_t)BASE_FIG
ssize_t | exptoadd =0
BDIGIT | v = y->frac[ix]
BDIGIT | shifter
| nf = y->exponent * (ssize_t)BASE_FIG
| return

## Macro Definition Documentation

#define BASE RMPD_BASE

Definition at line 69 of file bigdecimal.c.

Referenced by for(), if(), VpAddAbs(), VpDivd(), VpDtoV(), VpInit(), VpMult(), VpRdup(), VpSqrt(), VpSubAbs(), and VpVtoD().

#define BASE1 (BASE/10)

Definition at line 72 of file bigdecimal.c.

Referenced by if(), VpExponent10(), VpInit(), VpInternalRound(), and VpSzMantissa().

#define BASE_FIG RMPD_COMPONENT_FIGURES

Definition at line 68 of file bigdecimal.c.

Referenced by AddExponent(), BigDecimal_to_f(), if(), VpAddSub(), VpAlloc(), VpAsgn(), VpCtoV(), VpDivd(), VpExponent10(), VpInit(), VpLimitRound(), VpMult(), VpNumOfChars(), VpPower(), VpSqrt(), and VpVtoD().

#define BigMath_exp | ( |  | x,
|  |  | n
| ) |  | BigMath_s_exp(rb_mBigMath, (x), (n))

Definition at line 2011 of file bigdecimal.c.

Referenced by rmpd_power_by_big_decimal().

#define BigMath_log | ( |  | x,
|  |  | n
| ) |  | BigMath_s_log(rb_mBigMath, (x), (n))

Definition at line 2012 of file bigdecimal.c.

Referenced by rmpd_power_by_big_decimal().

#define DBLE_FIG (DBL_DIG+1) /* figure of double */

Definition at line 75 of file bigdecimal.c.

Referenced by VpInit(), VpSqrt(), and VpVtoD().

#define DoSomeOne | ( |  | x,
|  |  | y,
|  |  | f
| ) |  | rb_num_coerce_bin(x,y,f)

Definition at line 108 of file bigdecimal.c.

Referenced by BigDecimal_add(), BigDecimal_div2(), BigDecimal_divmod(), BigDecimal_divremain(), BigDecimal_mod(), BigDecimal_mult(), and BigDecimal_sub().

#define ENTER | ( |  | n | ) | volatile VALUE RB_UNUSED_VAR(vStack[n]);int iStack=0

Definition at line 63 of file bigdecimal.c.

Referenced by BigDecimal_abs(), BigDecimal_add(), BigDecimal_add2(), BigDecimal_ceil(), BigDecimal_coerce(), BigDecimal_div2(), BigDecimal_divmod(), BigDecimal_divremain(), BigDecimal_DoDivmod(), BigDecimal_dump(), BigDecimal_fix(), BigDecimal_floor(), BigDecimal_frac(), BigDecimal_hash(), BigDecimal_inspect(), BigDecimal_load(), BigDecimal_mod(), BigDecimal_mult(), BigDecimal_mult2(), BigDecimal_neg(), BigDecimal_power(), BigDecimal_prec(), BigDecimal_round(), BigDecimal_split(), BigDecimal_sqrt(), BigDecimal_sub(), BigDecimal_sub2(), BigDecimal_to_f(), BigDecimal_to_i(), BigDecimal_to_s(), BigDecimal_truncate(), and BigDecimalCmp().

#define GUARD_OBJ | ( |  | p,
|  |  | y
| ) |  | {p=y;SAVE(p);}

Definition at line 66 of file bigdecimal.c.

Referenced by BigDecimal_abs(), BigDecimal_add(), BigDecimal_add2(), BigDecimal_ceil(), BigDecimal_coerce(), BigDecimal_div2(), BigDecimal_divremain(), BigDecimal_DoDivmod(), BigDecimal_dump(), BigDecimal_fix(), BigDecimal_floor(), BigDecimal_frac(), BigDecimal_hash(), BigDecimal_inspect(), BigDecimal_load(), BigDecimal_mult(), BigDecimal_mult2(), BigDecimal_neg(), BigDecimal_power(), BigDecimal_prec(), BigDecimal_round(), BigDecimal_split(), BigDecimal_sqrt(), BigDecimal_sub(), BigDecimal_sub2(), BigDecimal_to_f(), BigDecimal_to_i(), BigDecimal_to_s(), BigDecimal_truncate(), and BigDecimalCmp().

#define HALF_BASE (BASE/2)

Definition at line 71 of file bigdecimal.c.

Referenced by VpInit().

#define is_positive | ( |  | x | ) | (!is_negative(x))

Definition at line 2035 of file bigdecimal.c.

Referenced by BigDecimal_power().

#define maxnr 100UL /* Maximum iterations for calcurating sqrt. */

Definition at line 3247 of file bigdecimal.c.

Referenced by VpSqrt().

#define MemCmp | ( |  | x,
|  |  | y,
|  |  | z
| ) |  | memcmp(x,y,z)

Definition at line 3251 of file bigdecimal.c.

#define NDEBUG

Definition at line 23 of file bigdecimal.c.

#define PUSH | ( |  | x | ) | vStack[iStack++] = (VALUE)(x);

Definition at line 64 of file bigdecimal.c.

Referenced by yaml_document_add_mapping(), yaml_document_add_scalar(), yaml_document_add_sequence(), yaml_document_append_mapping_pair(), yaml_document_append_sequence_item(), yaml_document_initialize(), yaml_document_start_event_initialize(), yaml_emitter_append_tag_directive(), yaml_emitter_emit_block_mapping_key(), yaml_emitter_emit_block_mapping_value(), yaml_emitter_emit_block_sequence_item(), yaml_emitter_emit_document_content(), yaml_emitter_emit_flow_mapping_key(), yaml_emitter_emit_flow_mapping_value(), yaml_emitter_emit_flow_sequence_item(), yaml_emitter_increase_indent(), yaml_parser_append_tag_directive(), yaml_parser_fetch_stream_start(), yaml_parser_increase_flow_level(), yaml_parser_load_mapping(), yaml_parser_load_scalar(), yaml_parser_load_sequence(), yaml_parser_parse_block_mapping_key(), yaml_parser_parse_block_mapping_value(), yaml_parser_parse_block_sequence_entry(), yaml_parser_parse_document_start(), yaml_parser_parse_flow_mapping_key(), yaml_parser_parse_flow_mapping_value(), yaml_parser_parse_flow_sequence_entry(), yaml_parser_parse_flow_sequence_entry_mapping_key(), yaml_parser_parse_flow_sequence_entry_mapping_value(), yaml_parser_parse_indentless_sequence_entry(), yaml_parser_process_directives(), yaml_parser_register_anchor(), and yaml_parser_roll_indent().

#define RBIGNUM_ZERO_P | ( |  | x | ) |

Value:
(RBIGNUM_LEN(x) == 0 || \
(RBIGNUM_DIGITS(x)[0] == 0 && \
(RBIGNUM_LEN(x) == 1 || bigzero_p(x))))
bigzero_p
static int bigzero_p(VALUE x)
Definition: bigdecimal.c:85
RBIGNUM_LEN
#define RBIGNUM_LEN(b)
RBIGNUM_DIGITS
#define RBIGNUM_DIGITS(b)

Definition at line 79 of file bigdecimal.c.

Referenced by BigMath_s_log().

#define RMPD_PRECISION_LIMIT_DEFAULT ((size_t)0)

Definition at line 3353 of file bigdecimal.c.

Referenced by VpGetPrecLimit().

#define rmpd_set_thread_local_exception_mode | ( |  | mode | ) |

Value:
rb_thread_local_aset( \
rb_thread_current(), \
id_BigDecimal_exception_mode, \
INT2FIX((int)(mode)) \
)
INT2FIX
#define INT2FIX(i)
id_BigDecimal_exception_mode
static ID id_BigDecimal_exception_mode
Definition: bigdecimal.c:44
rb_thread_current
VALUE rb_thread_current(void)
Definition: thread.c:2350
mode
VALUE mode
Definition: tcltklib.c:1664
rb_thread_local_aset
VALUE rb_thread_local_aset(VALUE, ID, VALUE)
Definition: thread.c:2748

Definition at line 3314 of file bigdecimal.c.

Referenced by VpGetException(), and VpSetException().

#define rmpd_set_thread_local_precision_limit | ( |  | limit | ) |

Value:
rb_thread_local_aset( \
rb_thread_current(), \
id_BigDecimal_precision_limit, \
SIZET2NUM(limit) \
)
SIZET2NUM
#define SIZET2NUM(v)
rb_thread_current
VALUE rb_thread_current(void)
Definition: thread.c:2350
id_BigDecimal_precision_limit
static ID id_BigDecimal_precision_limit
Definition: bigdecimal.c:46
rb_thread_local_aset
VALUE rb_thread_local_aset(VALUE, ID, VALUE)
Definition: thread.c:2748

Definition at line 3347 of file bigdecimal.c.

Referenced by VpGetPrecLimit(), and VpSetPrecLimit().

#define rmpd_set_thread_local_rounding_mode | ( |  | mode | ) |

Value:
rb_thread_local_aset( \
rb_thread_current(), \
id_BigDecimal_rounding_mode, \
INT2FIX((int)(mode)) \
)
id_BigDecimal_rounding_mode
static ID id_BigDecimal_rounding_mode
Definition: bigdecimal.c:45
INT2FIX
#define INT2FIX(i)
rb_thread_current
VALUE rb_thread_current(void)
Definition: thread.c:2350
mode
VALUE mode
Definition: tcltklib.c:1664
rb_thread_local_aset
VALUE rb_thread_local_aset(VALUE, ID, VALUE)
Definition: thread.c:2748

Definition at line 3384 of file bigdecimal.c.

Referenced by VpGetRoundMode(), and VpSetRoundMode().

#define RRATIONAL_NEGATIVE_P | ( |  | x | ) | RTEST(rb_funcall((x), '<', 1, INT2FIX(0)))

Definition at line 102 of file bigdecimal.c.

Referenced by BigMath_s_log().

#define RRATIONAL_ZERO_P | ( |  | x | ) |

Value:
(FIXNUM_P(RRATIONAL(x)->num) && \
FIX2LONG(RRATIONAL(x)->num) == 0)
FIXNUM_P
#define FIXNUM_P(f)
FIX2LONG
#define FIX2LONG(x)
RRATIONAL
#define RRATIONAL(obj)

Definition at line 97 of file bigdecimal.c.

Referenced by BigMath_s_log().

#define SAVE | ( |  | p | ) | PUSH(p->obj);

Definition at line 65 of file bigdecimal.c.

Referenced by BigDecimal_add(), BigDecimal_divmod(), BigDecimal_divremain(), BigDecimal_DoDivmod(), BigDecimal_mod(), BigDecimal_mult(), BigDecimal_sub(), and BigDecimalCmp().

#define StrCmp | ( |  | x,
|  |  | y
| ) |  | strcmp(x,y)

Definition at line 3252 of file bigdecimal.c.

Referenced by VpAlloc().

#define VpAllocReal | ( |  | prec | ) | (Real *)VpMemAlloc(offsetof(Real, frac) + (prec) * sizeof(BDIGIT))

Definition at line 574 of file bigdecimal.c.

Referenced by VpAlloc().

#define VpReallocReal | ( |  | ptr,
|  |  | prec
| ) |  | (Real *)VpMemRealloc((ptr), offsetof(Real, frac) + (prec) * sizeof(BDIGIT))

Definition at line 575 of file bigdecimal.c.

Referenced by VpCopy().

## Function Documentation

static int AddExponent | ( | Real * | a,
|  | SIGNED_VALUE | n
| ) |  |
| static

Definition at line 3733 of file bigdecimal.c.

References BASE_FIG, e, Real::exponent, m, n, SIGNED_VALUE, VP_EXCEPTION_OVERFLOW, VP_EXCEPTION_UNDERFLOW, VpException(), VpGetSign, VpSetInf, and VpSetZero.

Referenced by VpDivd(), VpMult(), VpNmlz(), VpRdup(), and VpSetPTR().

static VALUE BigDecimal_abs | ( | VALUE | self | ) |
| static

Definition at line 1542 of file bigdecimal.c.

References a, c, ENTER, GetVpValue(), GUARD_OBJ, mx, Real::Prec, ToValue(), VpAsgn(), VpBaseFig, VpChangeSign, and VpCreateRbObject().

Referenced by BigDecimal_power(), and Init_bigdecimal().

static VALUE BigDecimal_add | ( | VALUE | self,
|  | VALUE | r
| ) |  |
| static

Definition at line 836 of file bigdecimal.c.

References a, b, c, DBL_DIG, DoSomeOne, ENTER, GetAddSubPrec(), GetVpValue(), GetVpValueWithPrec(), GUARD_OBJ, mx, Real::obj, Real::Prec, RB_TYPE_P, SAVE, T_FLOAT, T_RATIONAL, ToValue(), VpAddSub(), VpBaseFig, VpCreateRbObject(), VpGetSign, VpIsNaN, and VpSetInf.

Referenced by BigDecimal_add2(), BigMath_s_exp(), BigMath_s_log(), and Init_bigdecimal().

static VALUE BigDecimal_add2 | ( | VALUE | self,
|  | VALUE | b,
|  | VALUE | n
| ) |  |
| static

Definition at line 1485 of file bigdecimal.c.

References BigDecimal_add(), cv, ENTER, GetPositiveInt(), GetVpValue(), GUARD_OBJ, SIGNED_VALUE, ToValue(), VpGetRoundMode(), VpLeftRound(), and VpSetPrecLimit().

Referenced by Init_bigdecimal().

static VALUE BigDecimal_ceil | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | self
| ) |  |
| static

Definition at line 1780 of file bigdecimal.c.

References a, BigDecimal_to_i(), c, Check_Type, ENTER, FIX2INT, GetVpValue(), GUARD_OBJ, mx, Real::Prec, rb_scan_args(), T_FIXNUM, ToValue(), VP_ROUND_CEIL, VpActiveRound(), VpBaseFig, VpCreateRbObject(), and VpSetPrecLimit().

Referenced by Init_bigdecimal().

static void BigDecimal_check_num | ( | Real * | p | ) |
| static

Definition at line 625 of file bigdecimal.c.

References VP_EXCEPTION_INFINITY, VP_EXCEPTION_NaN, VpException(), VpIsNaN, VpIsNegInf, and VpIsPosInf.

Referenced by BigDecimal_to_i(), and BigDecimal_to_r().

static VALUE BigDecimal_coerce | ( | VALUE | self,
|  | VALUE | other
| ) |  |
| static

Definition at line 781 of file bigdecimal.c.

References b, BigDecimal_to_f(), DATA_PTR(), ENTER, GetVpValue(), GetVpValueWithPrec(), GUARD_OBJ, Real::obj, obj, Real::Prec, rb_assoc_new(), RB_TYPE_P, T_FLOAT, T_RATIONAL, and VpBaseFig.

Referenced by Init_bigdecimal().

static VALUE BigDecimal_comp | ( | VALUE | self,
|  | VALUE | r
| ) |  |
| static

Definition at line 1042 of file bigdecimal.c.

References BigDecimalCmp().

Referenced by Init_bigdecimal().

static void BigDecimal_delete | ( | void * | pv | ) |
| static

Definition at line 138 of file bigdecimal.c.

References VpFree().

static VALUE BigDecimal_div2 | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | self
| ) |  |
| static

Definition at line 1449 of file bigdecimal.c.

References av, b, BigDecimal_DoDivmod(), BigDecimal_to_i(), cv, DoSomeOne, ENTER, GetPositiveInt(), GetVpValue(), GUARD_OBJ, ix, mod, n, NULL, Real::Prec, rb_intern, rb_scan_args(), SIGNED_VALUE, ToValue(), VpBaseFig, VpCreateRbObject(), VpDivd(), VpGetRoundMode(), VpLeftRound(), and VpSetPrecLimit().

Referenced by BigMath_s_exp(), BigMath_s_log(), GetVpValueWithPrec(), and Init_bigdecimal().

static VALUE BigDecimal_divmod | ( | VALUE | self,
|  | VALUE | r
| ) |  |
| static

Definition at line 1433 of file bigdecimal.c.

References BigDecimal_DoDivmod(), DoSomeOne, ENTER, mod, NULL, rb_assoc_new(), rb_intern, SAVE, and ToValue().

Referenced by Init_bigdecimal().

static VALUE BigDecimal_divremain | ( | VALUE | self,
|  | VALUE | r,
|  | Real ** | dv,
|  | Real ** | rv
| ) |  |
| static

Definition at line 1354 of file bigdecimal.c.

References d, DBL_DIG, DoSomeOne, ENTER, f, GetVpValue(), GetVpValueWithPrec(), GUARD_OBJ, Real::MaxPrec, mx, NULL, Real::Prec, rb_intern, RB_TYPE_P, SAVE, T_FLOAT, T_RATIONAL, VP_ROUND_DOWN, VpActiveRound(), VpAddSub(), VpBaseFig, VpCreateRbObject(), VpDivd(), VpFrac(), and VpMult().

Referenced by BigDecimal_remainder().

static VALUE BigDecimal_DoDivmod | ( | VALUE | self,
|  | VALUE | r,
|  | Real ** | div,
|  | Real ** | mod
| ) |  |
| static

Definition at line 1253 of file bigdecimal.c.

References a, b, c, d, DBL_DIG, ENTER, Real::exponent, GetAddSubPrec(), GetVpValue(), GetVpValueWithPrec(), GUARD_OBJ, mx, NULL, Real::Prec, Qfalse, Qtrue, rb_eZeroDivError, rb_raise(), RB_TYPE_P, res, SAVE, SIGNED_VALUE, T_FLOAT, T_RATIONAL, vabs, VP_ROUND_DOWN, VpActiveRound(), VpAddSub(), VpBaseFig, VpCreateRbObject(), VpDivd(), VpGetSign, VpIsInf, VpIsNaN, VpIsZero, VpMult(), VpOne(), and VpSetInf.

Referenced by BigDecimal_div2(), BigDecimal_divmod(), and BigDecimal_mod().

static VALUE BigDecimal_double_fig | ( | VALUE | self | ) |
| static

Definition at line 285 of file bigdecimal.c.

References INT2FIX, and VpDblFig.

Referenced by Init_bigdecimal().

static VALUE BigDecimal_dump | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | self
| ) |  |
| static

Definition at line 350 of file bigdecimal.c.

References dummy, ENTER, GetVpValue(), GUARD_OBJ, PRIuSIZE, rb_scan_args(), rb_str_new(), rb_str_resize(), RSTRING_PTR, strlen(), VpBaseFig, VpMaxPrec, VpNumOfChars(), and VpToString().

Referenced by Init_bigdecimal().

static VALUE BigDecimal_eq | ( | VALUE | self,
|  | VALUE | r
| ) |  |
| static

Definition at line 1058 of file bigdecimal.c.

References BigDecimalCmp().

Referenced by BigDecimal_power(), and Init_bigdecimal().

static VALUE BigDecimal_exponent | ( | VALUE | self | ) |
| static

Definition at line 1968 of file bigdecimal.c.

References e, GetVpValue(), INT2NUM, and VpExponent10().

Referenced by Init_bigdecimal().

static VALUE BigDecimal_fix | ( | VALUE | self | ) |
| static

Definition at line 1583 of file bigdecimal.c.

References a, c, ENTER, GetVpValue(), GUARD_OBJ, mx, Real::Prec, ToValue(), VP_ROUND_DOWN, VpActiveRound(), VpBaseFig, and VpCreateRbObject().

Referenced by Init_bigdecimal().

static VALUE BigDecimal_floor | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | self
| ) |  |
| static

Definition at line 1733 of file bigdecimal.c.

References a, BigDecimal_to_i(), c, Check_Type, ENTER, FIX2INT, GetVpValue(), GUARD_OBJ, mx, Real::Prec, rb_scan_args(), T_FIXNUM, ToValue(), VP_ROUND_FLOOR, VpActiveRound(), VpBaseFig, VpCreateRbObject(), and VpSetPrecLimit().

Referenced by Init_bigdecimal().

static VALUE BigDecimal_frac | ( | VALUE | self | ) |
| static

Definition at line 1702 of file bigdecimal.c.

References a, c, ENTER, GetVpValue(), GUARD_OBJ, mx, Real::Prec, ToValue(), VpBaseFig, VpCreateRbObject(), and VpFrac().

Referenced by Init_bigdecimal().

static VALUE BigDecimal_ge | ( | VALUE | self,
|  | VALUE | r
| ) |  |
| static

Definition at line 1110 of file bigdecimal.c.

References BigDecimalCmp().

Referenced by Init_bigdecimal().

static VALUE BigDecimal_global_new | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | self
| ) |  |
| static

Definition at line 2469 of file bigdecimal.c.

References BigDecimal_new(), NULL, Real::obj, rb_cBigDecimal, ToValue(), TypedData_Wrap_Struct, and VpCopy().

Referenced by Init_bigdecimal().

static VALUE BigDecimal_gt | ( | VALUE | self,
|  | VALUE | r
| ) |  |
| static

Definition at line 1097 of file bigdecimal.c.

References BigDecimalCmp().

Referenced by Init_bigdecimal().

static VALUE BigDecimal_hash | ( | VALUE | self | ) |
| static

Definition at line 321 of file bigdecimal.c.

References BDIGIT, ENTER, Real::exponent, Real::frac, GetVpValue(), GUARD_OBJ, hash, INT2FIX, p, Real::Prec, rb_memhash(), and Real::sign.

Referenced by Init_bigdecimal().

static VALUE BigDecimal_initialize | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | self
| ) |  |
| static

Definition at line 2389 of file bigdecimal.c.

References BigDecimal_new(), DATA_PTR(), Real::obj, rb_check_typeddata(), ToValue(), VpCopy(), and VpFree().

Referenced by Init_bigdecimal().

static VALUE BigDecimal_initialize_copy | ( | VALUE | self,
|  | VALUE | other
| ) |  |
| static

Definition at line 2411 of file bigdecimal.c.

References DATA_PTR(), rb_check_typeddata(), and VpCopy().

Referenced by Init_bigdecimal().

static VALUE BigDecimal_inspect | ( | VALUE | self | ) |
| static

Definition at line 1985 of file bigdecimal.c.

References ENTER, GetVpValue(), GUARD_OBJ, obj, PRIuSIZE, PRIxVALUE, rb_str_new(), rb_str_resize(), RSTRING_PTR, strlen(), tmp, VpBaseFig, VpMaxPrec, VpNumOfChars(), VpPrec, and VpToString().

Referenced by Init_bigdecimal().

static VALUE BigDecimal_IsFinite | ( | VALUE | self | ) |
| static

Definition at line 616 of file bigdecimal.c.

References GetVpValue(), p, Qfalse, Qtrue, VpIsInf, and VpIsNaN.

Referenced by Init_bigdecimal().

static VALUE BigDecimal_IsInfinite | ( | VALUE | self | ) |
| static

Definition at line 606 of file bigdecimal.c.

References GetVpValue(), INT2FIX, p, Qnil, VpIsNegInf, and VpIsPosInf.

Referenced by Init_bigdecimal().

static VALUE BigDecimal_IsNaN | ( | VALUE | self | ) |
| static

Definition at line 595 of file bigdecimal.c.

References GetVpValue(), p, Qfalse, Qtrue, and VpIsNaN.

Referenced by Init_bigdecimal().

static VALUE BigDecimal_le | ( | VALUE | self,
|  | VALUE | r
| ) |  |
| static

Definition at line 1084 of file bigdecimal.c.

References BigDecimalCmp().

Referenced by Init_bigdecimal().

static VALUE BigDecimal_limit | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | self
| ) |  |
| static

Definition at line 2490 of file bigdecimal.c.

References Check_Type, FIX2INT, INT2NUM, nf, Qnil, rb_eArgError, rb_raise(), rb_scan_args(), T_FIXNUM, VpGetPrecLimit(), and VpSetPrecLimit().

Referenced by Init_bigdecimal().

static VALUE BigDecimal_load | ( | VALUE | self,
|  | VALUE | str
| ) |  |
| static

Definition at line 372 of file bigdecimal.c.

References ENTER, GUARD_OBJ, ISDIGIT, m, Real::MaxPrec, rb_eTypeError, rb_raise(), RSTRING_PTR, SafeStringValue, ToValue(), VpBaseFig, and VpNewRbClass().

Referenced by Init_bigdecimal().

static VALUE BigDecimal_lt | ( | VALUE | self,
|  | VALUE | r
| ) |  |
| static

Definition at line 1071 of file bigdecimal.c.

References BigDecimalCmp().

Referenced by Init_bigdecimal().

static size_t BigDecimal_memsize | ( | const void * | ptr | ) |
| static

Definition at line 144 of file bigdecimal.c.

References BDIGIT, Real::MaxPrec, and ptr.

static VALUE BigDecimal_mod | ( | VALUE | self,
|  | VALUE | r
| ) |  |
| static

Definition at line 1341 of file bigdecimal.c.

References BigDecimal_DoDivmod(), DoSomeOne, ENTER, mod, NULL, SAVE, and ToValue().

Referenced by Init_bigdecimal().

static VALUE BigDecimal_mode | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | self
| ) |  |
| static

Definition at line 471 of file bigdecimal.c.

References check_rounding_mode(), Check_Type, f, FIX2INT, INT2FIX, NIL_P(), Qfalse, Qnil, Qtrue, rb_eArgError, rb_eTypeError, rb_raise(), rb_scan_args(), sw, T_FIXNUM, val, VP_EXCEPTION_ALL, VP_EXCEPTION_INFINITY, VP_EXCEPTION_NaN, VP_EXCEPTION_UNDERFLOW, VP_EXCEPTION_ZERODIVIDE, VP_ROUND_MODE, VpGetException(), VpGetRoundMode(), VpSetException(), and VpSetRoundMode().

Referenced by Init_bigdecimal().

static VALUE BigDecimal_mult | ( | VALUE | self,
|  | VALUE | r
| ) |  |
| static

Definition at line 1151 of file bigdecimal.c.

References a, b, c, DBL_DIG, DoSomeOne, ENTER, GetVpValue(), GetVpValueWithPrec(), GUARD_OBJ, mx, Real::Prec, RB_TYPE_P, SAVE, T_FLOAT, T_RATIONAL, ToValue(), VpBaseFig, VpCreateRbObject(), and VpMult().

Referenced by BigDecimal_mult2(), BigMath_s_exp(), BigMath_s_log(), and Init_bigdecimal().

static VALUE BigDecimal_mult2 | ( | VALUE | self,
|  | VALUE | b,
|  | VALUE | n
| ) |  |
| static

Definition at line 1519 of file bigdecimal.c.

References BigDecimal_mult(), cv, ENTER, GetPositiveInt(), GetVpValue(), GUARD_OBJ, SIGNED_VALUE, ToValue(), VpGetRoundMode(), VpLeftRound(), and VpSetPrecLimit().

Referenced by BigMath_s_exp(), BigMath_s_log(), Init_bigdecimal(), and rmpd_power_by_big_decimal().

static VALUE BigDecimal_neg | ( | VALUE | self | ) |
| static

Definition at line 1125 of file bigdecimal.c.

References a, c, ENTER, GetVpValue(), GUARD_OBJ, Real::Prec, ToValue(), VpAsgn(), VpBaseFig, and VpCreateRbObject().

Referenced by Init_bigdecimal().

static Real * BigDecimal_new | ( | int | argc,
|  | VALUE * | argv
| ) |  |
| static

Definition at line 2421 of file bigdecimal.c.

References CLASS_OF, DATA_PTR(), DBL_DIG, GetPositiveInt(), GetVpValue(), GetVpValueWithPrec(), is_kind_of_BigDecimal(), NIL_P(), rb_class2name(), rb_eArgError, rb_raise(), rb_scan_args(), RSTRING_PTR, StringValueCStr, T_BIGNUM, T_DATA, T_FIXNUM, T_FLOAT, T_RATIONAL, T_STRING, TYPE, and VpAlloc().

Referenced by BigDecimal_global_new(), and BigDecimal_initialize().

static VALUE BigDecimal_nonzero | ( | VALUE | self | ) |
| static

Definition at line 1032 of file bigdecimal.c.

References a, GetVpValue(), Qnil, and VpIsZero.

Referenced by Init_bigdecimal().

static VALUE BigDecimal_power | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | self
| ) |  |
| static

Definition at line 2131 of file bigdecimal.c.

References BigDecimal_abs(), BigDecimal_eq(), BigDecimal_round(), BigDecimal_to_i(), d, DATA_PTR(), DBL_DIG, ENTER, FIX2INT, GetVpValue(), GetVpValueWithPrec(), GUARD_OBJ, INT2FIX, is_even(), is_integer(), is_kind_of_BigDecimal(), is_negative(), is_one(), is_positive, is_zero(), n, NIL_P(), NULL, NUM2SSIZET, Real::obj, Real::Prec, rb_eMathDomainError, rb_eTypeError, rb_funcall(), RB_GC_GUARD, rb_obj_classname(), rb_raise(), rb_scan_args(), RB_TYPE_P, retry, RFLOAT_VALUE, rmpd_power_by_big_decimal(), round(), RRATIONAL, RTEST, SIGNED_VALUE, T_BIGNUM, T_DATA, T_FIXNUM, T_FLOAT, T_RATIONAL, ToValue(), TYPE, VpBaseFig, VpCreateRbObject(), VpGetSign, VpIsDef, VpIsInf, VpIsNaN, VpIsZero, VpPower(), VpSetInf, VpSetNaN, VpSetNegInf, VpSetPosInf, and zero().

Referenced by BigDecimal_power_op(), and Init_bigdecimal().

static VALUE BigDecimal_power_op | ( | VALUE | self,
|  | VALUE | exp
| ) |  |
| static

Definition at line 2357 of file bigdecimal.c.

References BigDecimal_power().

Referenced by Init_bigdecimal().

static VALUE BigDecimal_prec | ( | VALUE | self | ) |
| static

Definition at line 300 of file bigdecimal.c.

References ENTER, GetVpValue(), GUARD_OBJ, INT2NUM, Real::MaxPrec, obj, p, Real::Prec, rb_assoc_new(), and VpBaseFig.

Referenced by Init_bigdecimal().

static VALUE BigDecimal_remainder | ( | VALUE | self,
|  | VALUE | r
| ) |  |
| static

Definition at line 1404 of file bigdecimal.c.

References BigDecimal_divremain(), d, f, and ToValue().

Referenced by Init_bigdecimal().

static VALUE BigDecimal_round | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | self
| ) |  |
| static

Definition at line 1617 of file bigdecimal.c.

References a, BigDecimal_to_i(), c, check_rounding_mode(), Check_Type, ENTER, FIX2INT, GetVpValue(), GUARD_OBJ, mx, Real::Prec, rb_scan_args(), sw, T_FIXNUM, ToValue(), VpActiveRound(), VpBaseFig, VpCreateRbObject(), VpGetRoundMode(), and VpSetPrecLimit().

Referenced by BigDecimal_power(), BigMath_s_exp(), and Init_bigdecimal().

static VALUE BigDecimal_s_allocate | ( | VALUE | klass | ) |
| static

Definition at line 2363 of file bigdecimal.c.

References NULL, Real::obj, and VpNewRbClass().

Referenced by Init_bigdecimal().

static VALUE BigDecimal_save_exception_mode | ( | VALUE | self | ) |
| static

Definition at line 2550 of file bigdecimal.c.

References Qnil, rb_jump_tag(), rb_protect(), rb_yield(), ret, state, VpGetException(), and VpSetException().

Referenced by Init_bigdecimal().

static VALUE BigDecimal_save_limit | ( | VALUE | self | ) |
| static

Definition at line 2600 of file bigdecimal.c.

References Qnil, rb_jump_tag(), rb_protect(), rb_yield(), ret, state, VpGetPrecLimit(), and VpSetPrecLimit().

Referenced by Init_bigdecimal().

static VALUE BigDecimal_save_rounding_mode | ( | VALUE | self | ) |
| static

Definition at line 2575 of file bigdecimal.c.

References Qnil, rb_jump_tag(), rb_protect(), rb_yield(), ret, state, VpGetRoundMode(), and VpSetRoundMode().

Referenced by Init_bigdecimal().

static VALUE BigDecimal_sign | ( | VALUE | self | ) |
| static

Definition at line 2525 of file bigdecimal.c.

References GetVpValue(), INT2FIX, s, and Real::sign.

Referenced by Init_bigdecimal().

static VALUE BigDecimal_split | ( | VALUE | self | ) |
| static

Definition at line 1931 of file bigdecimal.c.

References e, ENTER, GetVpValue(), GUARD_OBJ, INT2FIX, INT2NUM, len, memmove(), obj, rb_ary_new2(), rb_ary_push(), rb_str_new(), rb_str_resize(), RSTRING_PTR, s, str, strlen(), VpExponent10(), VpNumOfChars(), and VpSzMantissa().

Referenced by BigDecimal_to_i(), BigDecimal_to_r(), and Init_bigdecimal().

static VALUE BigDecimal_sqrt | ( | VALUE | self,
|  | VALUE | nFig
| ) |  |
| static

Definition at line 1564 of file bigdecimal.c.

References a, c, ENTER, GetPositiveInt(), GetVpValue(), GUARD_OBJ, mx, n, Real::Prec, ToValue(), VpBaseFig, VpCreateRbObject(), VpDblFig, and VpSqrt().

Referenced by Init_bigdecimal().

static VALUE BigDecimal_sub | ( | VALUE | self,
|  | VALUE | r
| ) |  |
| static

Definition at line 890 of file bigdecimal.c.

References a, b, c, DBL_DIG, DoSomeOne, ENTER, GetAddSubPrec(), GetVpValue(), GetVpValueWithPrec(), GUARD_OBJ, mx, Real::obj, Real::Prec, RB_TYPE_P, SAVE, T_FLOAT, T_RATIONAL, ToValue(), VpAddSub(), VpBaseFig, VpCreateRbObject(), VpGetSign, VpIsNaN, and VpSetInf.

Referenced by BigDecimal_sub2(), BigMath_s_log(), and Init_bigdecimal().

static VALUE BigDecimal_sub2 | ( | VALUE | self,
|  | VALUE | b,
|  | VALUE | n
| ) |  |
| static

Definition at line 1502 of file bigdecimal.c.

References BigDecimal_sub(), cv, ENTER, GetPositiveInt(), GetVpValue(), GUARD_OBJ, SIGNED_VALUE, ToValue(), VpGetRoundMode(), VpLeftRound(), and VpSetPrecLimit().

Referenced by Init_bigdecimal().

static VALUE BigDecimal_to_f | ( | VALUE | self | ) |
| static

Definition at line 688 of file bigdecimal.c.

References BASE_FIG, buf, d, DBL_MAX_10_EXP, DBL_MIN_10_EXP, e, ENTER, errno, GetVpValue(), GUARD_OBJ, p, rb_float_new(), rb_str_new(), RSTRING_PTR, Real::sign, SIGNED_VALUE, str, strtod, VP_EXCEPTION_OVERFLOW, VP_EXCEPTION_UNDERFLOW, VpException(), VpGetDoubleNegInf(), VpGetDoublePosInf(), VpNumOfChars(), VpToString(), and VpVtoD().

Referenced by BigDecimal_coerce(), and Init_bigdecimal().

static VALUE BigDecimal_to_i | ( | VALUE | self | ) |
| static

Definition at line 643 of file bigdecimal.c.

References a, BDIGIT_DBL_SIGNED, BigDecimal_check_num(), BigDecimal_split(), e, ENTER, Real::frac, GetVpValue(), GUARD_OBJ, INT2FIX, LONG2NUM, nf, p, RARRAY_PTR(), rb_eFloatDomainError, rb_funcall(), rb_intern, rb_raise(), RB_TYPE_P, ret, RSTRING_LEN, T_FLOAT, VpBaseFig, VpExponent10(), and VpGetSign.

Referenced by BigDecimal_ceil(), BigDecimal_div2(), BigDecimal_floor(), BigDecimal_power(), BigDecimal_round(), BigDecimal_truncate(), and Init_bigdecimal().

static VALUE BigDecimal_to_r | ( | VALUE | self | ) |
| static

Definition at line 735 of file bigdecimal.c.

References a, BigDecimal_check_num(), BigDecimal_split(), GetVpValue(), INT2FIX, p, RARRAY_PTR(), rb_funcall(), rb_intern, rb_Rational(), rb_Rational1, RSTRING_LEN, VpExponent10(), and VpGetSign.

Referenced by Init_bigdecimal().

static VALUE BigDecimal_to_s | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | self
| ) |  |
| static

Definition at line 1840 of file bigdecimal.c.

References ENTER, f, fmt, GetPositiveInt(), GetVpValue(), GUARD_OBJ, ISDIGIT, ISSPACE, rb_scan_args(), rb_str_new(), rb_str_resize(), RB_TYPE_P, RSTRING_PTR, SafeStringValue, str, strlen(), T_STRING, VpNumOfChars(), VpToFString(), and VpToString().

Referenced by Init_bigdecimal().

static VALUE BigDecimal_truncate | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | self
| ) |  |
| static

Definition at line 1673 of file bigdecimal.c.

References a, BigDecimal_to_i(), c, Check_Type, ENTER, FIX2INT, GetVpValue(), GUARD_OBJ, mx, Real::Prec, rb_scan_args(), T_FIXNUM, ToValue(), VP_ROUND_DOWN, VpActiveRound(), VpBaseFig, VpCreateRbObject(), and VpSetPrecLimit().

Referenced by Init_bigdecimal().

static VALUE BigDecimal_uplus | ( | VALUE | self | ) |
| static

Definition at line 813 of file bigdecimal.c.

Referenced by Init_bigdecimal().

static VALUE BigDecimal_version | ( | VALUE | self | ) |
| static

Definition at line 114 of file bigdecimal.c.

References rb_str_new2.

Referenced by Init_bigdecimal().

static VALUE BigDecimal_zero | ( | VALUE | self | ) |
| static

Definition at line 1024 of file bigdecimal.c.

References a, GetVpValue(), Qfalse, Qtrue, and VpIsZero.

Referenced by Init_bigdecimal().

static VALUE BigDecimalCmp | ( | VALUE | self,
|  | VALUE | r,
|  | char | op
| ) |  |
| static

Definition at line 929 of file bigdecimal.c.

References a, b, DBL_DIG, e, ENTER, f, GetVpValue(), GetVpValueWithPrec(), GUARD_OBJ, INT2FIX, is_kind_of_BigDecimal(), NULL, Real::Prec, Qfalse, Qnil, Qtrue, rb_bug(), rb_intern, rb_num_coerce_cmp(), rb_num_coerce_relop(), RTEST, SAVE, SIGNED_VALUE, T_BIGNUM, T_DATA, T_FIXNUM, T_FLOAT, T_RATIONAL, TYPE, UNREACHABLE, VpBaseFig, and VpComp().

Referenced by BigDecimal_comp(), BigDecimal_eq(), BigDecimal_ge(), BigDecimal_gt(), BigDecimal_le(), and BigDecimal_lt().

static VALUE BigMath_s_exp | ( | VALUE | klass,
|  | VALUE | x,
|  | VALUE | vprec
| ) |  |
| static

Definition at line 2621 of file bigdecimal.c.

References argv, BigDecimal_add(), BigDecimal_div2(), BigDecimal_mult(), BigDecimal_mult2(), BigDecimal_round(), cannot_be_coerced_into_BigDecimal(), d, DATA_PTR(), DBL_DIG, GetVpValue(), GetVpValueWithPrec(), i, INT2NUM, is_kind_of_BigDecimal(), isinf(), isnan, m, n, NULL, NUM2SSIZET, Real::obj, one(), rb_eArgError, RB_GC_GUARD, rb_raise(), RFLOAT_VALUE, rmpd_double_figures(), SIGNED_VALUE, SSIZET2NUM, T_BIGNUM, T_DATA, T_FIXNUM, T_FLOAT, T_RATIONAL, ToValue(), TYPE, vabs, VP_SIGN_POSITIVE_INFINITE, VpCreateRbObject(), VpExponent10(), VpGetSign, VpIsNaN, VpIsNegInf, VpIsPosInf, VpIsZero, VpSetInf, VpSetNaN, and VpSetSign.

Referenced by Init_bigdecimal().

static VALUE BigMath_s_log | ( | VALUE | klass,
|  | VALUE | x,
|  | VALUE | vprec
| ) |  |
| static

Definition at line 2753 of file bigdecimal.c.

References argv, BigDecimal_add(), BigDecimal_div2(), BigDecimal_mult(), BigDecimal_mult2(), BigDecimal_sub(), buf, cannot_be_coerced_into_BigDecimal(), d, DATA_PTR(), DBL_DIG, FIX2LONG, GetVpValue(), GetVpValueWithPrec(), i, INT2FIX, is_integer(), is_kind_of_BigDecimal(), isinf(), isnan, m, n, NULL, NUM2SSIZET, Real::obj, one(), PRIdVALUE, rb_eArgError, rb_eMathDomainError, RB_GC_GUARD, rb_raise(), RBIGNUM_NEGATIVE_P, RBIGNUM_ZERO_P, RFLOAT_VALUE, rmpd_double_figures(), RRATIONAL_NEGATIVE_P, RRATIONAL_ZERO_P, SIGNED_VALUE, snprintf, SSIZET2NUM, T_BIGNUM, T_COMPLEX, T_DATA, T_FIXNUM, T_FLOAT, T_RATIONAL, ToValue(), TYPE, vabs, VP_SIGN_POSITIVE_INFINITE, VpCreateRbObject(), VpExponent10(), VpGetSign, VpIsNaN, VpIsNegInf, VpIsPosInf, VpIsZero, VpSetInf, VpSetNaN, and zero().

Referenced by Init_bigdecimal().

static int bigzero_p | ( | VALUE | x | ) |
| inline static

Definition at line 85 of file bigdecimal.c.

References BDIGIT, i, RBIGNUM_DIGITS, and RBIGNUM_LEN.

static void cannot_be_coerced_into_BigDecimal | ( | VALUE | exc_class,
|  | VALUE | v
| ) |  |
| static

Definition at line 177 of file bigdecimal.c.

References rb_class_name(), rb_exc_new3(), rb_exc_raise(), rb_inspect(), rb_obj_class(), rb_special_const_p(), rb_str_cat2(), rb_str_dup(), and str.

Referenced by BigMath_s_exp(), BigMath_s_log(), and GetVpValueWithPrec().

static unsigned short check_rounding_mode | ( | VALUE const | v | ) |
| static

Definition at line 397 of file bigdecimal.c.

References Check_Type, FIX2UINT, id, id_banker, id_ceil, id_ceiling, id_default, id_down, id_floor, id_half_down, id_half_even, id_half_up, id_truncate, id_up, rb_eArgError, rb_raise(), sw, SYM2ID, T_FIXNUM, T_SYMBOL, TYPE, VP_ROUND_CEIL, VP_ROUND_DOWN, VP_ROUND_FLOOR, VP_ROUND_HALF_DOWN, VP_ROUND_HALF_EVEN, VP_ROUND_HALF_UP, VP_ROUND_UP, and VpIsRoundMode().

Referenced by BigDecimal_mode(), and BigDecimal_round().

for | ( | v /= | shifter = `1` | ) |

Definition at line 5677 of file bigdecimal.c.

References BASE, and Real::frac.

Referenced by glob_helper(), objspace_each_objects(), and parse_char_class().

for | ( | i | = `0; i<=n; ++i` | ) |

Definition at line 5773 of file bigdecimal.c.

References Real::exponent, Real::frac, ix, s, SIGNED_VALUE, VpGetSign, VpRdup(), VpSetOne, and VpSetSign.

static size_t GetAddSubPrec | ( | Real * | a,
|  | Real * | b
| ) |  |
| static

Definition at line 526 of file bigdecimal.c.

References d, Real::exponent, mx, Real::Prec, SIGNED_VALUE, VP_EXCEPTION_INFINITY, VpException(), and VpIsDef.

Referenced by BigDecimal_add(), BigDecimal_DoDivmod(), and BigDecimal_sub().

static SIGNED_VALUE GetPositiveInt | ( | VALUE | v | ) |
| static

Definition at line 547 of file bigdecimal.c.

References Check_Type, FIX2INT, n, rb_eArgError, rb_raise(), SIGNED_VALUE, and T_FIXNUM.

Referenced by BigDecimal_add2(), BigDecimal_div2(), BigDecimal_mult2(), BigDecimal_new(), BigDecimal_sqrt(), BigDecimal_sub2(), and BigDecimal_to_s().

static Real* GetVpValue | ( | VALUE | v,
|  | int | must
| ) |  |
| static

Definition at line 272 of file bigdecimal.c.

References GetVpValueWithPrec().

Referenced by BigDecimal_abs(), BigDecimal_add(), BigDecimal_add2(), BigDecimal_ceil(), BigDecimal_coerce(), BigDecimal_div2(), BigDecimal_divremain(), BigDecimal_DoDivmod(), BigDecimal_dump(), BigDecimal_exponent(), BigDecimal_fix(), BigDecimal_floor(), BigDecimal_frac(), BigDecimal_hash(), BigDecimal_inspect(), BigDecimal_IsFinite(), BigDecimal_IsInfinite(), BigDecimal_IsNaN(), BigDecimal_mult(), BigDecimal_mult2(), BigDecimal_neg(), BigDecimal_new(), BigDecimal_nonzero(), BigDecimal_power(), BigDecimal_prec(), BigDecimal_round(), BigDecimal_sign(), BigDecimal_split(), BigDecimal_sqrt(), BigDecimal_sub(), BigDecimal_sub2(), BigDecimal_to_f(), BigDecimal_to_i(), BigDecimal_to_r(), BigDecimal_to_s(), BigDecimal_truncate(), BigDecimal_zero(), BigDecimalCmp(), BigMath_s_exp(), and BigMath_s_log().

static Real* GetVpValueWithPrec | ( | VALUE | v,
|  | long | prec,
|  | int | must
| ) |  |
| static

Definition at line 195 of file bigdecimal.c.

References args, BigDecimal_div2(), cannot_be_coerced_into_BigDecimal(), DATA_PTR(), DBL_DIG, FIX2LONG, id_to_r, is_kind_of_BigDecimal(), LONG2NUM, NULL, Qundef, rb_big2str(), rb_eArgError, rb_eTypeError, rb_funcall(), rb_obj_classname(), rb_raise(), RRATIONAL, RSTRING_PTR, SafeStringValue, strlen(), T_BIGNUM, T_DATA, T_FIXNUM, T_FLOAT, T_RATIONAL, T_STRING, ToValue(), TYPE, VpBaseFig, and VpCreateRbObject().

Referenced by BigDecimal_add(), BigDecimal_coerce(), BigDecimal_divremain(), BigDecimal_DoDivmod(), BigDecimal_mult(), BigDecimal_new(), BigDecimal_power(), BigDecimal_sub(), BigDecimalCmp(), BigMath_s_exp(), BigMath_s_log(), GetVpValue(), and if().

GUARD_OBJ | ( | a | ,
|  | GetVpValue(self, 1) |
| ) |  |

GUARD_OBJ | ( | * | c,
|  | VpCreateRbObject(mx,"#0") |
| ) |  |

GUARD_OBJ | ( | * | res,
|  | VpCreateRbObject((mx+1)*2+(VpBaseFig()+1),"#0") |
| ) |  |

if | ( | RB_TYPE_P(r, T_FLOAT) |  | ) |

Definition at line 1186 of file bigdecimal.c.

References DBL_DIG, and GetVpValueWithPrec().

Referenced by assign_heap_slot(), concat_left_node_opt_info(), gc_mark_children(), getaddrinfo(), getnameinfo(), io_reopen(), iseq_insns_unification(), iseq_peephole_optimize(), name_add(), names_clear(), onig_foreach_name(), onig_memsize(), onig_names_free(), onig_number_of_names(), onig_renumber_name_table(), parse_char_class(), parse_enclose(), parse_exp(), pruby_eval(), rb_iseq_line_trace_each(), rb_thread_call_with_gvl(), rb_threadptr_execute_interrupts(), rb_w32_select_with_thread(), ruby__sfvextra(), set_optimize_map_info(), vm_callee_setup_arg_complex(), VpSqrt(), yaml_emitter_write_block_scalar_hints(), yaml_emitter_write_indent(), yaml_parser_scan_block_scalar_breaks(), zstream_detach_buffer(), and zstream_run().

else if | ( | RB_TYPE_P(r, T_RATIONAL) |  | ) |

Definition at line 1189 of file bigdecimal.c.

References GetVpValueWithPrec(), Real::Prec, and VpBaseFig.

if | ( | ! | b | ) |

Initial value:
{
return FAIL_Tk_Init
FAIL_Tk_Init
#define FAIL_Tk_Init
Definition: stubs.h:32

Definition at line 549 of file stubs.c.

if | ( | mx< b->Prec+ | vabsb->exponent | ) |

if | ( | r! | = `(VALUE)0` | ) |

Definition at line 1235 of file bigdecimal.c.

if | ( | VpToSpecialString(a, psz, fPlus) |  | ) |

Definition at line 5089 of file bigdecimal.c.

References BASE1, Real::frac, i, m, and strlen().

if | ( |  | ) |

Definition at line 5661 of file bigdecimal.c.

References nf, VP_ROUND_CEIL, VP_ROUND_FLOOR, VpGetSign, and VpSetZero.

if | ( | (size_t) ix >=y-> | Prec | ) |

if | ( | exptoadd | ,
|  | 0 |
| ) |  |

Definition at line 5789 of file bigdecimal.c.

References BASE, BASE_FIG, Real::exponent, exptoadd, Real::frac, and SIGNED_VALUE.

if | ( | ! | VpHasValy | ) |

void Init_bigdecimal | ( | void |  | ) |

Definition at line 3011 of file bigdecimal.c.

References arg, BigDecimal_abs(), BigDecimal_add(), BigDecimal_add2(), BigDecimal_ceil(), BigDecimal_coerce(), BigDecimal_comp(), BigDecimal_div2(), BigDecimal_divmod(), BigDecimal_double_fig(), BigDecimal_dump(), BigDecimal_eq(), BigDecimal_exponent(), BigDecimal_fix(), BigDecimal_floor(), BigDecimal_frac(), BigDecimal_ge(), BigDecimal_global_new(), BigDecimal_gt(), BigDecimal_hash(), BigDecimal_initialize(), BigDecimal_initialize_copy(), BigDecimal_inspect(), BigDecimal_IsFinite(), BigDecimal_IsInfinite(), BigDecimal_IsNaN(), BigDecimal_le(), BigDecimal_limit(), BigDecimal_load(), BigDecimal_lt(), BigDecimal_mod(), BigDecimal_mode(), BigDecimal_mult(), BigDecimal_mult2(), BigDecimal_neg(), BigDecimal_nonzero(), BigDecimal_power(), BigDecimal_power_op(), BigDecimal_prec(), BigDecimal_remainder(), BigDecimal_round(), BigDecimal_s_allocate(), BigDecimal_save_exception_mode(), BigDecimal_save_limit(), BigDecimal_save_rounding_mode(), BigDecimal_sign(), BigDecimal_split(), BigDecimal_sqrt(), BigDecimal_sub(), BigDecimal_sub2(), BigDecimal_to_f(), BigDecimal_to_i(), BigDecimal_to_r(), BigDecimal_to_s(), BigDecimal_truncate(), BigDecimal_uplus(), BigDecimal_version(), BigDecimal_zero(), BigMath_s_exp(), BigMath_s_log(), id_banker, id_BigDecimal_exception_mode, id_BigDecimal_precision_limit, id_BigDecimal_rounding_mode, id_ceil, id_ceiling, id_default, id_down, id_eq, id_floor, id_half_down, id_half_even, id_half_up, id_to_r, id_truncate, id_up, INT2FIX, rb_cBigDecimal, rb_cNumeric, rb_define_alloc_func(), rb_define_class(), rb_define_const(), rb_define_global_function(), rb_define_method(), rb_define_module(), rb_define_singleton_method(), rb_intern_const, rb_mBigMath, rb_str_new2, SIGNED_VALUE, VP_EXCEPTION_ALL, VP_EXCEPTION_INFINITY, VP_EXCEPTION_NaN, VP_EXCEPTION_OVERFLOW, VP_EXCEPTION_UNDERFLOW, VP_EXCEPTION_ZERODIVIDE, VP_ROUND_CEIL, VP_ROUND_DOWN, VP_ROUND_FLOOR, VP_ROUND_HALF_DOWN, VP_ROUND_HALF_EVEN, VP_ROUND_HALF_UP, VP_ROUND_MODE, VP_ROUND_UP, VP_SIGN_NaN, VP_SIGN_NEGATIVE_FINITE, VP_SIGN_NEGATIVE_INFINITE, VP_SIGN_NEGATIVE_ZERO, VP_SIGN_POSITIVE_FINITE, VP_SIGN_POSITIVE_INFINITE, VP_SIGN_POSITIVE_ZERO, VpBaseVal, and VpInit().

static int is_even | ( | VALUE | x | ) |
| inline static

Definition at line 2086 of file bigdecimal.c.

References FIX2LONG, RBIGNUM_DIGITS, T_BIGNUM, T_FIXNUM, and TYPE.

Referenced by BigDecimal_power().

static int is_integer | ( | VALUE | x | ) |
| inline static

Definition at line 2015 of file bigdecimal.c.

References RB_TYPE_P, T_BIGNUM, and T_FIXNUM.

Referenced by BigDecimal_power(), and BigMath_s_log().

static int is_kind_of_BigDecimal | ( | VALUE const | v | ) |
| inline static

Definition at line 156 of file bigdecimal.c.

References rb_typeddata_is_kind_of().

Referenced by BigDecimal_new(), BigDecimal_power(), BigDecimalCmp(), BigMath_s_exp(), BigMath_s_log(), and GetVpValueWithPrec().

static int is_negative | ( | VALUE | x | ) |
| inline static

Definition at line 2021 of file bigdecimal.c.

References FIX2LONG, FIXNUM_P, INT2FIX, rb_funcall(), RB_TYPE_P, RBIGNUM_NEGATIVE_P, RFLOAT_VALUE, RTEST, T_BIGNUM, and T_FLOAT.

Referenced by BigDecimal_power().

static int is_one | ( | VALUE | x | ) |
| inline static

Definition at line 2061 of file bigdecimal.c.

References FIX2LONG, FIXNUM_P, id_eq, INT2FIX, Qfalse, rb_funcall(), RRATIONAL, RTEST, T_BIGNUM, T_FIXNUM, T_RATIONAL, and TYPE.

Referenced by BigDecimal_power().

static int is_zero | ( | VALUE | x | ) |
| inline static

Definition at line 2038 of file bigdecimal.c.

References FIX2LONG, FIXNUM_P, id_eq, INT2FIX, Qfalse, rb_funcall(), RRATIONAL, RTEST, T_BIGNUM, T_FIXNUM, T_RATIONAL, and TYPE.

Referenced by BigDecimal_power().

memset | ( | y->frac+ix+ | 1,
|  | 0 | ,
|  | (y->Prec-(ix+1))*sizeof(BDIGIT) |
| ) |  |

Referenced by alloc_addrinfo(), argf_initialize(), asn1time_to_time(), assign_heap_slot(), big2str_karatsuba(), CreateChild(), dh_generate(), dsa_generate(), enc_pred_char(), enc_register_at(), enc_succ_char(), enc_table_expand(), EVP_MD_CTX_cleanup(), EVP_MD_CTX_create(), EVP_MD_CTX_init(), fbuffer_alloc(), fiber_t_alloc(), fill_random_seed(), flo_to_s(), flock_winnt(), fole_each(), gc_clear_slot_bits(), get_version(), getpage(), HMAC_CTX_cleanup(), init_randomseed(), join_argv(), make_compile_option(), makroom(), ole_create_dcom(), ole_invoke(), ole_invoke2(), ole_propertyput(), ossl_asn1_get_asn1type(), ossl_cipher_init(), ossl_cipher_initialize(), overlapped_socket_io(), pack_unpack(), PEM_def_callback(), rand_init(), random_load(), rb_dlcfunc_call(), rb_dlptr_malloc(), rb_econv_convert0(), rb_fiddle_ptr_malloc(), rb_file_expand_path_internal(), rb_iseq_disasm(), rb_objspace_alloc(), rb_quad_pack(), rb_str_format(), rb_str_justify(), rb_strftime_with_timespec(), rb_w32_asynchronize(), rb_w32_getsockname(), rbtime2vtdate(), recvmsg(), RMD160_Finish(), RMD160_Update(), rsa_generate(), sdbm_firstkey(), sdbm_prep(), sendmsg(), setup_overlapped(), socketpair_internal(), sockopt_s_linger(), splpage(), strio_ungetc(), unescape_escaped_nonascii(), VpCtoV(), VpDtoV(), VpMemAlloc(), VpMult(), w_float(), winnt_stat(), yaml_document_delete(), yaml_emitter_delete(), yaml_emitter_dump(), yaml_emitter_initialize(), yaml_event_delete(), yaml_parser_delete(), yaml_parser_initialize(), yaml_parser_load(), yaml_parser_parse(), yaml_parser_scan(), yaml_string_extend(), and yaml_token_delete().

NORETURN | ( | static void | cannot_be_coerced_into_BigDecimalVALUE, VALUE | ) |

static double One | ( | void |  | ) |
| static

Definition at line 3453 of file bigdecimal.c.

References gOne_ABCED9B4_CE73__00400511F31D.

Referenced by VpGetDoubleNegInf(), VpGetDoubleNegZero(), and VpGetDoublePosInf().

return | ( | VALUE |  | ) |

static VALUE rmpd_power_by_big_decimal | ( | Real const * | x,
|  | Real const * | exp,
|  | ssize_t const | n
| ) |  |
| static

Definition at line 2103 of file bigdecimal.c.

References BigDecimal_mult2(), BigMath_exp, BigMath_log, Real::obj, obj, RB_GC_GUARD, SSIZET2NUM, ToValue(), VpCreateRbObject(), and VpIsZero.

Referenced by BigDecimal_power().

SAVE | ( | b |  | ) |

switch | ( | f |  | ) |

Definition at line 5733 of file bigdecimal.c.

References div, Real::frac, VP_ROUND_CEIL, VP_ROUND_DOWN, VP_ROUND_FLOOR, VP_ROUND_HALF_DOWN, VP_ROUND_HALF_EVEN, VP_ROUND_HALF_UP, VP_ROUND_UP, and VpGetSign.

Referenced by dump_node().

static VALUE ToValue | ( | Real * | p | ) |
| static

Definition at line 162 of file bigdecimal.c.

References Real::obj, VP_EXCEPTION_INFINITY, VP_EXCEPTION_NaN, VpException(), VpIsNaN, VpIsNegInf, and VpIsPosInf.

Referenced by BigDecimal_abs(), BigDecimal_add(), BigDecimal_add2(), BigDecimal_ceil(), BigDecimal_div2(), BigDecimal_divmod(), BigDecimal_fix(), BigDecimal_floor(), BigDecimal_frac(), BigDecimal_global_new(), BigDecimal_initialize(), BigDecimal_load(), BigDecimal_mod(), BigDecimal_mult(), BigDecimal_mult2(), BigDecimal_neg(), BigDecimal_power(), BigDecimal_remainder(), BigDecimal_round(), BigDecimal_sqrt(), BigDecimal_sub(), BigDecimal_sub2(), BigDecimal_truncate(), BigMath_s_exp(), BigMath_s_log(), GetVpValueWithPrec(), and rmpd_power_by_big_decimal().

return ToValue | ( | c |  | ) |

static BDIGIT VpAddAbs | ( | Real * | a,
|  | Real * | b,
|  | Real * | c
| ) |  |
| static

Definition at line 4099 of file bigdecimal.c.

References av, BASE, BDIGIT, bp, cp, Real::frac, VpAsgn(), and VpSetPTR().

Referenced by VpAddSub().

VP_EXPORT size_t VpAddSub | ( | Real * | c,
|  | Real * | a,
|  | Real * | b,
|  | int | operation
| ) |  |

Definition at line 3971 of file bigdecimal.c.

References a, b, BASE_FIG, BDIGIT, Real::exponent, Real::frac, i, Min, n, Real::Prec, sw, VpAddAbs(), VpAsgn(), VpGetSign, VpInternalRound(), VpIsDefOP(), VpIsZero, VpSetSign, VpSetZero, and VpSubAbs().

Referenced by BigDecimal_add(), BigDecimal_divremain(), BigDecimal_DoDivmod(), BigDecimal_sub(), and VpSqrt().

VP_EXPORT Real* VpAlloc | ( | size_t | mx,
|  | const char * | szVal
| ) |  |

Definition at line 3776 of file bigdecimal.c.

References BASE_FIG, buf, i, ISDIGIT, ISSPACE, Max, Real::MaxPrec, mx, ne, nf, NULL, rb_str_resize(), rb_str_tmp_new(), RSTRING_PTR, StrCmp, strlen(), SZ_INF, SZ_NaN, SZ_NINF, SZ_PINF, v, VpAllocReal, VpCtoV(), VpGetPrecLimit(), VpSetNaN, VpSetNegInf, VpSetPosInf, and VpSetZero.

Referenced by BigDecimal_new(), VpCreateRbObject(), VpInit(), VpMult(), VpNewRbClass(), VpPower(), and VpSqrt().

VP_EXPORT size_t VpAsgn | ( | Real * | c,
|  | Real * | a,
|  | int | isw
| ) |  |

Definition at line 3929 of file bigdecimal.c.

References BASE_FIG, BDIGIT, Real::exponent, Real::frac, Real::MaxPrec, memcpy(), n, Real::Prec, VpGetSign, VpInternalRound(), VpIsInf, VpIsNaN, VpIsZero, VpLimitRound(), VpSetInf, VpSetNaN, VpSetSign, and VpSetZero.

Referenced by BigDecimal_abs(), BigDecimal_neg(), VpAddAbs(), VpAddSub(), VpDivd(), VpFrac(), VpMult(), VpPower(), VpSqrt(), and VpSubAbs().

VP_EXPORT int VpComp | ( | Real * | a,
|  | Real * | b
| ) |  |

Definition at line 4771 of file bigdecimal.c.

References e, Real::exponent, Real::frac, mx, Real::Prec, Real::sign, val, VpGetSign, VpIsDef, VpIsNaN, and VpIsZero.

Referenced by BigDecimalCmp().

static Real * VpCopy | ( | Real * | pv,
|  | Real const *const | x
| ) |  |
| static

Definition at line 578 of file bigdecimal.c.

References assert, BDIGIT, Real::exponent, Real::flag, Real::frac, Real::MaxPrec, MEMCPY, NULL, Real::Prec, Real::sign, and VpReallocReal.

Referenced by BigDecimal_global_new(), BigDecimal_initialize(), and BigDecimal_initialize_copy().

VP_EXPORT Real* VpCreateRbObject | ( | size_t | mx,
|  | const char * | str
| ) |  |

Definition at line 567 of file bigdecimal.c.

References Real::obj, rb_cBigDecimal, TypedData_Wrap_Struct, and VpAlloc().

Referenced by BigDecimal_abs(), BigDecimal_add(), BigDecimal_ceil(), BigDecimal_div2(), BigDecimal_divremain(), BigDecimal_DoDivmod(), BigDecimal_fix(), BigDecimal_floor(), BigDecimal_frac(), BigDecimal_mult(), BigDecimal_neg(), BigDecimal_power(), BigDecimal_round(), BigDecimal_sqrt(), BigDecimal_sub(), BigDecimal_truncate(), BigMath_s_exp(), BigMath_s_log(), GetVpValueWithPrec(), and rmpd_power_by_big_decimal().

VP_EXPORT int VpCtoV | ( | Real * | a,
|  | const char * | int_chr,
|  | size_t | ni,
|  | const char * | frac,
|  | size_t | nf,
|  | const char * | exp_chr,
|  | size_t | ne
| ) |  |

Definition at line 5192 of file bigdecimal.c.

References BASE_FIG, BDIGIT, e, Real::exponent, Real::frac, i, Real::MaxPrec, memset(), ne, Real::Prec, rb_warn(), SIGNED_VALUE, VP_EXCEPTION_INFINITY, VpException(), VpNmlz(), VpSetInf, VpSetSign, VpSetZero, and zero().

Referenced by VpAlloc().

VP_EXPORT size_t VpDivd | ( | Real * | c,
|  | Real * | r,
|  | Real * | a,
|  | Real * | b
| ) |  |

Definition at line 4522 of file bigdecimal.c.

References AddExponent(), BASE, BASE_FIG, BDIGIT, BDIGIT_DBL, Real::exponent, Real::frac, i, Real::MaxPrec, Min, n, Real::Prec, q, rb_bug(), VP_EXCEPTION_NaN, VP_EXCEPTION_ZERODIVIDE, VpAsgn(), VpException(), VpGetSign, VpIsDefOP(), VpIsOne, VpIsZero, VpNmlz(), VpSetInf, VpSetNaN, VpSetSign, and VpSetZero.

Referenced by BigDecimal_div2(), BigDecimal_divremain(), BigDecimal_DoDivmod(), VpPower(), and VpSqrt().

VP_EXPORT void VpDtoV | ( | Real * | m,
|  | double | d
| ) |  |

Definition at line 5405 of file bigdecimal.c.

References BASE, BDIGIT, d, Real::exponent, Real::frac, i, isinf(), isnan, Real::MaxPrec, memset(), ne, Real::Prec, SIGNED_VALUE, val, VpInternalRound(), VpSetNaN, VpSetNegInf, VpSetPosInf, VpSetSign, and VpSetZero.

Referenced by VpSqrt().

VP_EXPORT int VpException | ( | unsigned short | f,
|  | const char * | str,
|  | int | always
| ) |  |

Definition at line 3514 of file bigdecimal.c.

References exc, rb_eFloatDomainError, rb_fatal(), rb_raise(), VP_EXCEPTION_INFINITY, VP_EXCEPTION_MEMORY, VP_EXCEPTION_NaN, VP_EXCEPTION_OP, VP_EXCEPTION_UNDERFLOW, VP_EXCEPTION_ZERODIVIDE, and VpGetException().

Referenced by AddExponent(), BigDecimal_check_num(), BigDecimal_to_f(), GetAddSubPrec(), ToValue(), VpCtoV(), VpDivd(), VpIsDefOP(), VpMemAlloc(), VpMemRealloc(), and VpSqrt().

VP_EXPORT ssize_t VpExponent10 | ( | Real * | a | ) |

Definition at line 4985 of file bigdecimal.c.

References BASE1, BASE_FIG, ex, Real::exponent, Real::frac, n, and VpHasVal.

Referenced by BigDecimal_exponent(), BigDecimal_split(), BigDecimal_to_i(), BigDecimal_to_r(), BigMath_s_exp(), and BigMath_s_log().

static void VpFormatSt | ( | char * | psz,
|  | size_t | fFmt
| ) |  |
| static

Definition at line 4960 of file bigdecimal.c.

References i, ISSPACE, memmove(), nf, and strlen().

VP_EXPORT void VpFrac | ( | Real * | y,
|  | Real * | x
| ) |  |

Definition at line 5913 of file bigdecimal.c.

References Real::exponent, Real::frac, Real::MaxPrec, Min, Real::Prec, VpAsgn(), VpGetSign, VpHasVal, VpNmlz(), VpSetSign, and VpSetZero.

Referenced by BigDecimal_divremain(), and BigDecimal_frac().

VP_EXPORT void VpFree | ( | Real * | pv | ) |

Definition at line 3292 of file bigdecimal.c.

References getchar, NULL, and xfree.

Referenced by BigDecimal_delete(), BigDecimal_initialize(), VpMult(), VpPower(), and VpSqrt().

VP_EXPORT double VpGetDoubleNaN | ( | void |  | ) |

Definition at line 3473 of file bigdecimal.c.

References Zero().

Referenced by VpInit(), and VpVtoD().

VP_EXPORT double VpGetDoubleNegInf | ( | void |  | ) |

Definition at line 3489 of file bigdecimal.c.

References One(), and Zero().

Referenced by BigDecimal_to_f(), VpGetDoubleNegZero(), VpInit(), and VpVtoD().

VP_EXPORT double VpGetDoubleNegZero | ( | void |  | ) |

Definition at line 3497 of file bigdecimal.c.

References One(), and VpGetDoubleNegInf().

Referenced by VpInit(), and VpVtoD().

VP_EXPORT double VpGetDoublePosInf | ( | void |  | ) |

Definition at line 3481 of file bigdecimal.c.

References One(), and Zero().

Referenced by BigDecimal_to_f(), VpInit(), and VpVtoD().

static unsigned short VpGetException | ( | void |  | ) |
| static

Definition at line 3322 of file bigdecimal.c.

References FIX2UINT, id_BigDecimal_exception_mode, NIL_P(), rb_thread_current(), rb_thread_local_aref(), RMPD_EXCEPTION_MODE_DEFAULT, and rmpd_set_thread_local_exception_mode.

Referenced by BigDecimal_mode(), BigDecimal_save_exception_mode(), and VpException().

VP_EXPORT size_t VpGetPrecLimit | ( | void |  | ) |

Definition at line 3357 of file bigdecimal.c.

References id_BigDecimal_precision_limit, NIL_P(), NUM2SIZET, rb_thread_current(), rb_thread_local_aref(), RMPD_PRECISION_LIMIT_DEFAULT, and rmpd_set_thread_local_precision_limit.

Referenced by BigDecimal_limit(), BigDecimal_save_limit(), VpAlloc(), VpLimitRound(), and VpSetPrecLimit().

VP_EXPORT unsigned short VpGetRoundMode | ( | void |  | ) |

Definition at line 3392 of file bigdecimal.c.

References FIX2INT, id_BigDecimal_rounding_mode, NIL_P(), rb_thread_current(), rb_thread_local_aref(), RMPD_ROUNDING_MODE_DEFAULT, and rmpd_set_thread_local_rounding_mode.

Referenced by BigDecimal_add2(), BigDecimal_div2(), BigDecimal_mode(), BigDecimal_mult2(), BigDecimal_round(), BigDecimal_save_rounding_mode(), BigDecimal_sub2(), VpInternalRound(), VpLimitRound(), and VpSetRoundMode().

VP_EXPORT size_t VpInit | ( | BDIGIT | BaseVal | ) |

Definition at line 3695 of file bigdecimal.c.

References BASE, BASE1, BASE_FIG, DBLE_FIG, HALF_BASE, rmpd_double_figures(), VpAlloc(), VpGetDoubleNaN(), VpGetDoubleNegInf(), VpGetDoubleNegZero(), and VpGetDoublePosInf().

Referenced by Init_bigdecimal().

static void VpInternalRound | ( | Real * | c,
|  | size_t | ixDigit,
|  | BDIGIT | vPrev,
|  | BDIGIT | v
| ) |  |
| static

Definition at line 5840 of file bigdecimal.c.

References BASE1, VP_ROUND_CEIL, VP_ROUND_DOWN, VP_ROUND_FLOOR, VP_ROUND_HALF_DOWN, VP_ROUND_HALF_EVEN, VP_ROUND_HALF_UP, VP_ROUND_UP, VpGetRoundMode(), VpGetSign, VpLimitRound(), VpNmlz(), and VpRdup().

Referenced by VpAddSub(), VpAsgn(), and VpDtoV().

static int VpIsDefOP | ( | Real * | c,
|  | Real * | a,
|  | Real * | b,
|  | int | sw
| ) |  |
| static

Definition at line 3554 of file bigdecimal.c.

References VP_EXCEPTION_INFINITY, VP_EXCEPTION_NaN, VpException(), VpGetSign, VpIsInf, VpIsNaN, VpIsZero, VpSetInf, VpSetNaN, and VpSetZero.

Referenced by VpAddSub(), VpDivd(), and VpMult().

VP_EXPORT int VpIsRoundMode | ( | unsigned short | n | ) |

Definition at line 3408 of file bigdecimal.c.

References VP_ROUND_CEIL, VP_ROUND_DOWN, VP_ROUND_FLOOR, VP_ROUND_HALF_DOWN, VP_ROUND_HALF_EVEN, VP_ROUND_HALF_UP, and VP_ROUND_UP.

Referenced by check_rounding_mode(), and VpSetRoundMode().

static int VpLimitRound | ( | Real * | c,
|  | size_t | ixDigit
| ) |  |
| static

Definition at line 5827 of file bigdecimal.c.

References BASE_FIG, Real::Prec, VpGetPrecLimit(), VpGetRoundMode(), VpLeftRound(), and VpNmlz().

Referenced by VpAsgn(), VpInternalRound(), and VpMult().

VP_EXPORT void* VpMemAlloc | ( | size_t | mb | ) |

Definition at line 3268 of file bigdecimal.c.

References memset(), p, VP_EXCEPTION_MEMORY, VpException(), and xmalloc.

VP_EXPORT void* VpMemRealloc | ( | void * | ptr,
|  | size_t | mb
| ) |  |

Definition at line 3282 of file bigdecimal.c.

References p, VP_EXCEPTION_MEMORY, VpException(), and xrealloc.

VP_EXPORT size_t VpMult | ( | Real * | c,
|  | Real * | a,
|  | Real * | b
| ) |  |

Definition at line 4397 of file bigdecimal.c.

References a, AddExponent(), b, BASE, BASE_FIG, BDIGIT, BDIGIT_DBL, c, Real::exponent, Real::frac, i, Real::MaxPrec, memset(), NULL, Real::Prec, s, VpAlloc(), VpAsgn(), VpFree(), VpGetSign, VpIsDefOP(), VpIsOne, VpIsZero, VpLimitRound(), VpNmlz(), VpSetSign, and VpSetZero.

Referenced by BigDecimal_divremain(), BigDecimal_DoDivmod(), BigDecimal_mult(), VpPower(), and VpSqrt().

VP_EXPORT Real* VpNewRbClass | ( | size_t | mx,
|  | const char * | str,
|  | VALUE | klass
| ) |  |

Definition at line 559 of file bigdecimal.c.

References Real::obj, TypedData_Wrap_Struct, and VpAlloc().

Referenced by BigDecimal_load(), and BigDecimal_s_allocate().

static int VpNmlz | ( | Real * | a | ) |
| static

Definition at line 4733 of file bigdecimal.c.

References AddExponent(), BDIGIT, Real::frac, i, memmove(), Real::Prec, SIGNED_VALUE, VpGetSign, VpIsDef, VpIsZero, and VpSetZero.

Referenced by VpCtoV(), VpDivd(), VpFrac(), VpInternalRound(), VpLimitRound(), VpMult(), and VpRdup().

VpNmlz | ( | y |  | ) |

VP_EXPORT size_t VpNumOfChars | ( | Real * | vp,
|  | const char * | pszFmt
| ) |  |

Definition at line 3651 of file bigdecimal.c.

References BASE_FIG, ex, Real::exponent, NULL, Real::Prec, SIGNED_VALUE, and VpIsDef.

Referenced by BigDecimal_dump(), BigDecimal_inspect(), BigDecimal_split(), BigDecimal_to_f(), and BigDecimal_to_s().

VP_EXPORT Real* VpOne | ( | void |  | ) |

Definition at line 3726 of file bigdecimal.c.

References VpConstOne.

Referenced by BigDecimal_DoDivmod().

VP_EXPORT int VpPower | ( | Real * | y,
|  | Real * | x,
|  | SIGNED_VALUE | n
| ) |  |

Definition at line 5961 of file bigdecimal.c.

References BASE_FIG, Real::exponent, Real::frac, Real::MaxPrec, n, NULL, Real::Prec, s, SIGNED_VALUE, VpAlloc(), VpAsgn(), VpDivd(), VpFree(), VpGetSign, VpIsInf, VpIsNaN, VpIsPosInf, VpIsZero, VpMult(), VpSetInf, VpSetNaN, VpSetOne, VpSetSign, and VpSetZero.

Referenced by BigDecimal_power().

static int VpRdup | ( | Real * | m,
|  | size_t | ind_m
| ) |  |
| static

Definition at line 5888 of file bigdecimal.c.

References AddExponent(), BASE, BDIGIT, Real::frac, Real::Prec, and VpNmlz().

Referenced by for(), and VpInternalRound().

static void VpSetException | ( | unsigned short | f | ) |
| static

Definition at line 3338 of file bigdecimal.c.

References rmpd_set_thread_local_exception_mode.

Referenced by BigDecimal_mode(), and BigDecimal_save_exception_mode().

VP_EXPORT size_t VpSetPrecLimit | ( | size_t | n | ) |

Definition at line 3373 of file bigdecimal.c.

References rmpd_set_thread_local_precision_limit, s, and VpGetPrecLimit().

Referenced by BigDecimal_add2(), BigDecimal_ceil(), BigDecimal_div2(), BigDecimal_floor(), BigDecimal_limit(), BigDecimal_mult2(), BigDecimal_round(), BigDecimal_save_limit(), BigDecimal_sub2(), and BigDecimal_truncate().

static size_t VpSetPTR | ( | Real * | a,
|  | Real * | b,
|  | Real * | c,
|  | size_t * | a_pos,
|  | size_t * | b_pos,
|  | size_t * | c_pos,
|  | BDIGIT * | av,
|  | BDIGIT * | bv
| ) |  |
| static

Definition at line 4302 of file bigdecimal.c.

References AddExponent(), Real::exponent, Real::frac, Max, Real::MaxPrec, and Real::Prec.

Referenced by VpAddAbs(), and VpSubAbs().

VP_EXPORT unsigned short VpSetRoundMode | ( | unsigned short | n | ) |

Definition at line 3426 of file bigdecimal.c.

References n, rmpd_set_thread_local_rounding_mode, VpGetRoundMode(), and VpIsRoundMode().

Referenced by BigDecimal_mode(), and BigDecimal_save_rounding_mode().

VP_EXPORT int VpSqrt | ( | Real * | y,
|  | Real * | x
| ) |  |

Definition at line 5535 of file bigdecimal.c.

References BASE, BASE_FIG, DBLE_FIG, e, Real::exponent, f, if(), maxnr, Real::MaxPrec, Min, n, NULL, PRIdSIZE, SIGNED_VALUE, val, VP_EXCEPTION_OP, VpAddSub(), VpAlloc(), VpAsgn(), VpChangeSign, VpDivd(), VpDtoV(), VpException(), VpFree(), VpGetSign, VpHasVal, VpIsOne, VpIsZero, VpMult(), VpSetNaN, VpSetOne, and VpVtoD().

Referenced by BigDecimal_sqrt().

static BDIGIT VpSubAbs | ( | Real * | a,
|  | Real * | b,
|  | Real * | c
| ) |  |
| static

Definition at line 4190 of file bigdecimal.c.

References av, BASE, BDIGIT, bp, cp, Real::frac, VpAsgn(), and VpSetPTR().

Referenced by VpAddSub().

VP_EXPORT void VpSzMantissa | ( | Real * | a,
|  | char * | psz
| ) |  |

Definition at line 5002 of file bigdecimal.c.

References BASE1, BDIGIT_DBL, e, Real::frac, i, m, n, nn, Real::Prec, strlen(), SZ_INF, SZ_NaN, SZ_NINF, VpGetSign, VpIsNaN, VpIsNegInf, VpIsPosInf, VpIsPosZero, and VpIsZero.

Referenced by BigDecimal_split().

VP_EXPORT int VpVtoD | ( | double * | d,
|  | SIGNED_VALUE * | e,
|  | Real * | m
| ) |  |

Definition at line 5341 of file bigdecimal.c.

References BASE, BASE_FIG, DBLE_FIG, div, Real::exponent, f, Real::frac, Min, Real::Prec, SIGNED_VALUE, VpGetDoubleNaN(), VpGetDoubleNegInf(), VpGetDoubleNegZero(), VpGetDoublePosInf(), VpGetSign, VpIsNaN, VpIsNegInf, VpIsNegZero, VpIsPosInf, and VpIsPosZero.

Referenced by BigDecimal_to_f(), and VpSqrt().

while | ( | a->frac/ | shift[0] = `= 0` | ) |

Definition at line 5117 of file bigdecimal.c.

References ex.

Referenced by ruby_vm_run_at_exit_hooks().

while | ( | sprintf( | psz[-1] = `='0'` | ) |

Definition at line 5121 of file bigdecimal.c.

while | ( | (v/=10)! | = `0` | ) |

Definition at line 5813 of file bigdecimal.c.

static double Zero | ( | void |  | ) |
| static

Definition at line 3447 of file bigdecimal.c.

References gZero_ABCED9B1_CE73__00400511F31D.

Referenced by VpGetDoubleNaN(), VpGetDoubleNegInf(), and VpGetDoublePosInf().

## Variable Documentation

* a = NULL

Definition at line 1182 of file bigdecimal.c.

Referenced by addrinfo_ipv4_loopback_p(), addrinfo_ipv4_multicast_p(), addrinfo_ipv4_private_p(), assert_array(), BigDecimal_abs(), BigDecimal_add(), BigDecimal_ceil(), BigDecimal_DoDivmod(), BigDecimal_fix(), BigDecimal_floor(), BigDecimal_frac(), BigDecimal_mult(), BigDecimal_neg(), BigDecimal_nonzero(), BigDecimal_round(), BigDecimal_sqrt(), BigDecimal_sub(), BigDecimal_to_i(), BigDecimal_to_r(), BigDecimal_truncate(), BigDecimal_zero(), BigDecimalCmp(), bmcall(), c_civil_to_jd(), c_jd_to_civil(), c_jd_to_commercial(), calc_wday(), cdhash_hash(), cmp_equal(), d_lite_marshal_dump(), date_s__load(), date_zone_to_diff(), diff(), do_coerce(), f_addsub(), fix_divmod(), fix_minus(), fix_mul(), fix_plus(), fix_pow(), flo_cmp(), flo_divmod(), flo_eq(), flo_eql(), flo_ge(), flo_gt(), flo_le(), flo_lt(), float_rationalize(), genrand_real(), genrand_real2(), intrcmp(), isLegalUTF8(), jisx0301_date(), long_mul(), md5_process(), memcmp(), mmrot3_(), mmswap_(), mult(), multadd(), nucomp_abs(), nucomp_marshal_dump(), nurat_marshal_dump(), nurat_rationalize(), opt_eq_func(), ossl_pkcs7_copy(), ossl_x509_copy(), ossl_x509crl_copy(), ossl_x509req_copy(), p_gamma(), pack_pack(), pack_unpack(), q_gamma(), quo(), rb_econv_init_by_convpath_i(), rb_iseq_parameters(), rb_Rational(), rb_time_unmagnify(), rb_time_unmagnify_to_float(), ripper_token2eventid(), rsock_addrinfo_new(), rt_complete_frags(), SHA1_Transform(), SHA256_Transform(), SHA512_Transform(), sort_1(), sort_2(), sort_by_cmp(), st_foreach_safe(), strscan_inspect(), strstr(), swap_node(), time_round(), ulp(), unnamed_parameters(), vm_exec_core(), VpAddSub(), VpMult(), wcmp(), wi_mul(), and wquo().

B b = in[1]

Definition at line 1182 of file bigdecimal.c.

Referenced by big2str_karatsuba(), BigDecimal_add(), BigDecimal_coerce(), BigDecimal_div2(), BigDecimal_DoDivmod(), BigDecimal_mult(), BigDecimal_sub(), BigDecimalCmp(), c_civil_to_jd(), c_jd_to_civil(), d2b(), date__strptime_internal(), date_zone_to_diff(), diff(), f_addsub(), f_round_common(), fix_divmod(), fix_minus(), fix_mul(), fix_plus(), fix_pow(), fix_to_s(), flo_cmp(), flo_divmod(), flo_eq(), flo_eql(), flo_ge(), flo_gt(), flo_le(), flo_lt(), float_rationalize(), genrand_real(), genrand_real2(), i2b(), intcmp(), is_internal_cmd(), long_mul(), md5_process(), memcmp(), mmrot3_(), mmswap_(), mult(), multadd(), new_args_tail_gen(), nurat_rationalize(), opt_eq_func(), ossl_bn_is_bit_set(), ossl_pkcs7_copy(), ossl_x509_copy(), ossl_x509crl_copy(), ossl_x509req_copy(), pack_unpack(), parse_comp(), parse_eu_cb(), parse_us_cb(), pow5mult(), quo(), range_each_func(), range_include(), range_max(), range_min(), range_size(), range_step(), range_step_size(), rb_any_cmp(), rb_big_to_s(), rb_file_expand_path_internal(), rb_fix2str(), rb_hash_set_default_proc(), rb_range_beg_len(), rb_range_values(), rb_reg_expr_str(), rb_str_to_i(), rb_str_upto(), rb_time_unmagnify(), rb_time_unmagnify_to_float(), read_comp(), read_digits(), ruby_dtoa(), ruby_strtoul(), s2b(), SHA1_Transform(), SHA256_Transform(), SHA512_Transform(), sort_1(), sort_2(), sort_by_cmp(), strscan_inspect(), strstr(), swap_node(), time_round(), unescape_unicode(), valid_range_p(), vm_caller_setup_args(), vm_exec_core(), VpAddSub(), VpMult(), wcmp(), wi_mul(), and wquo().

const rb_data_type_t BigDecimal_data_type
| static

Initial value:
= {
"BigDecimal",
{0, BigDecimal_delete, BigDecimal_memsize,},
}
BigDecimal_delete
static void BigDecimal_delete(void *pv)
Definition: bigdecimal.c:138
BigDecimal_memsize
static size_t BigDecimal_memsize(const void *ptr)
Definition: bigdecimal.c:144

Definition at line 150 of file bigdecimal.c.

Real * c =NULL

Definition at line 1205 of file bigdecimal.c.

Referenced by add_activated_refinement(), add_char_opt_map_info(), add_ctype_to_cc(), argf_readbyte(), big_sparse_p(), BigDecimal_abs(), BigDecimal_add(), BigDecimal_ceil(), BigDecimal_DoDivmod(), BigDecimal_fix(), BigDecimal_floor(), BigDecimal_frac(), BigDecimal_mult(), BigDecimal_neg(), BigDecimal_round(), BigDecimal_sqrt(), BigDecimal_sub(), BigDecimal_truncate(), bigsqr_fast(), bm_init_skip(), broken_getc(), broken_ungetc(), c_jd_to_civil(), cap_ungetc(), class_or_module_required(), cmp_eq(), cmp_ge(), cmp_gt(), cmp_le(), cmp_lt(), conv_backslash_value(), convert_UTF8_to_JSON(), curses_getch(), date__strptime_internal(), dbl2big(), diff(), enc_strlen(), enc_succ_alnum_char(), f_addsub(), f_cmp(), fetch_char_property_to_ctype(), fetch_escaped_value(), fetch_name(), fetch_name_with_level(), fetch_range_quantifier(), fetch_token(), fetch_token_in_cc(), find_dirsep(), fix_minus(), fix_plus(), fmt_setup(), getdbit(), has_magic(), Init_curses(), int_chr(), int_downto(), int_upto(), intern_str(), io_bufread(), is_internal_cmd(), is_onechar_cclass(), iso2022jp_check_conv(), load_file_internal(), long_mul(), md5_process(), mime_integrity(), mime_putc(), mime_ungetc(), mime_ungetc_buf(), mimeout_addchar(), mmrot3_(), month_arg(), mult(), nfc_getc(), nfc_ungetc(), nkf_buf_push(), noconvert(), node_new_str_raw_char(), node_str_cat_char(), numchar_getc(), numchar_ungetc(), nurat_rationalize_internal(), onig_reduce_nested_quantifier(), onig_scan_unsigned_number(), onigenc_mbn_mbc_to_code(), onigenc_with_ascii_strncmp(), onigenc_with_ascii_strnicmp(), original_module(), pack_pack(), pack_unpack(), parse_enclose(), parse_posix_bracket(), parser_here_document(), parser_heredoc_identifier(), parser_nextc(), parser_parse_string(), parser_peek_variable_name(), parser_prepare(), parser_read_escape(), parser_regx_options(), parser_tok_hex(), parser_tokadd_escape(), parser_tokadd_mbchar(), parser_tokadd_string(), parser_yylex(), path_inspect(), proc_options(), quo(), r_byte(), r_le(), r_long(), r_object0(), range_each_func(), range_max(), range_min(), rb_cstr_to_inum(), rb_enc_ascget(), rb_enc_strlen_cr(), rb_gzreader_each_byte(), rb_gzreader_each_char(), rb_gzwriter_putc(), rb_io_each_char(), rb_io_each_codepoint(), rb_io_getbyte(), rb_io_getline_1(), rb_io_putc(), rb_io_readbyte(), rb_io_readchar(), rb_method_name_error(), rb_nkf_putchar(), rb_num_coerce_relop(), rb_obj_inspect(), rb_path_to_class(), rb_reg_expr_str(), rb_reg_quote(), rb_reg_regsub(), rb_str_buf_cat_ascii(), rb_str_capitalize_bang(), rb_str_count(), rb_str_delete_bang(), rb_str_downcase_bang(), rb_str_dump(), rb_str_enumerate_codepoints(), rb_str_enumerate_lines(), rb_str_format(), rb_str_inspect(), rb_str_ord(), rb_str_reverse_bang(), rb_str_rstrip_bang(), rb_str_split_m(), rb_str_squeeze_bang(), rb_str_succ(), rb_str_swapcase_bang(), rb_str_upcase_bang(), rb_str_upto(), rb_time_unmagnify(), rb_time_unmagnify_to_float(), rb_tolower(), rb_toupper(), rb_undef(), rb_using_refinement(), rb_w32_cmdvector(), rb_w32_getc(), rb_w32_putc(), reg_fragment_setenc_gen(), rmext(), ruby_strtod(), ruby_strtoul(), s3e(), s_oconv(), scan_digits(), scan_unsigned_hexadecimal_number(), scan_unsigned_octal_number(), setdbit(), SHA1_Transform(), SHA256_Transform(), SHA512_Transform(), sign_bits(), sip_hash_init(), status_push_ch(), std_ungetc(), str_end_cmp(), str_end_with_asciichar(), strcasehash(), strio_each_byte(), strio_each_char(), strio_each_codepoint(), strio_getbyte(), strio_putc(), strio_readbyte(), strio_readchar(), swap_node(), sym_printable(), tr_find(), tr_setup_table(), tr_trans(), trnext(), unescape_nonascii(), update_char_offset(), url_ungetc(), utf8_to_uv(), VpMult(), wi_mul(), window_box(), window_getbkgd(), window_getch(), wquo(), x0212_shift(), x0212_unshift(), and z_conv().

BDIGIT div = b

Definition at line 1199 of file bigdecimal.c.

Referenced by fix_divide(), fix_divmod(), fixdivmod(), flo_divmod(), flodivmod(), iseq_specialized_instruction(), rb_big_divmod(), switch(), and VpVtoD().

BDIGIT e

Definition at line 5085 of file bigdecimal.c.

Referenced by AddExponent(), appendline(), BigDecimal_exponent(), BigDecimal_split(), BigDecimal_to_f(), BigDecimal_to_i(), BigDecimalCmp(), build_exception(), c_jd_to_civil(), coderange_scan(), cond0(), date_strftime_with_tmx(), enc_strlen(), enumerator_block_call(), enumerator_each(), enumerator_feed(), enumerator_next_values(), enumerator_peek_values(), enumerator_rewind(), enumerator_size(), env_assoc(), error_print(), establishShell(), flo_to_s(), float_rationalize(), gengo(), getrusage_time(), gmtime_r(), gzreader_charboundary(), Init_ossl_rsa(), inspect_enumerator(), intern_str(), iseq_data_to_ary(), lazy_set_method(), load_encoding(), loaded_feature_path(), localtime_r(), mk_ary_of_str(), n2i(), name_add(), name_find(), next_i(), next_ii(), nurat_rationalize(), onigenc_str_bytelen_null(), onigenc_strlen_null(), ossl_get_errors(), ossl_make_error(), parse_jis_cb(), pipe_open(), r_object0(), range_each_func(), range_include(), range_max(), range_min(), range_size(), range_step(), range_step_size(), rb_ary_delete(), rb_ary_delete_same(), rb_chsize(), rb_cstr_to_dbl(), rb_enc_strlen_cr(), rb_enc_symname_type(), rb_feature_p(), rb_file_expand_path_internal(), rb_file_open_internal(), rb_file_s_extname(), rb_hash_s_create(), rb_io_extract_modeenc(), rb_io_getline_1(), rb_io_getline_fast(), rb_range_beg_len(), rb_range_values(), rb_reg_regsub(), rb_reg_s_union(), rb_str_chomp_bang(), rb_str_end_with(), rb_str_hash(), rb_str_index(), rb_str_lstrip_bang(), rb_str_reverse(), rb_str_reverse_bang(), rb_str_rindex(), rb_str_rstrip_bang(), rb_str_splice(), rb_str_subpos(), rb_str_succ(), rb_str_upto(), rb_strftime_with_timespec(), rb_threadptr_pending_interrupt_include_p(), rb_w32_aspawn_flags(), rb_w32_spawn(), rescue_callback(), rmext(), rsa_generate(), rt_complete_frags(), ruby_enc_find_basename(), ruby_enc_find_extname(), ruby_strtod(), search_nonascii(), setup_exception(), SHA1_Transform(), SHA256_Transform(), SHA512_Transform(), st_init_table_with_size(), str_nth(), str_nth_len(), str_strlen(), strio_getline(), swallow(), syserr_eqq(), timeofday(), VpComp(), VpCtoV(), VpSqrt(), VpSzMantissa(), w_float(), and zip_ary().

else

Initial value:
{
b = GetVpValue(r,0)
GetVpValue
static Real * GetVpValue(VALUE v, int must)
Definition: bigdecimal.c:272
r
r
Definition: bigdecimal.c:1196
b
Real * b
Definition: bigdecimal.c:1182

Definition at line 1192 of file bigdecimal.c.

ex = a->exponent * (ssize_t)BASE_FIG

Definition at line 5087 of file bigdecimal.c.

Referenced by big_fdiv(), rb_io_s_popen(), ruby_cleanup(), VpExponent10(), VpNumOfChars(), and while().

exptoadd =0

Definition at line 5655 of file bigdecimal.c.

Referenced by if().

volatile const double gOne_ABCED9B4_CE73__00400511F31D = 1.0

Definition at line 3445 of file bigdecimal.c.

Referenced by One().

volatile const double gZero_ABCED9B1_CE73__00400511F31D = 0.0

Definition at line 3444 of file bigdecimal.c.

Referenced by Zero().

long i

Initial value:
{
struct invoke_info *inf = (struct invoke_info *)arg
inf
struct invoke_info inf
Definition: tcltklib.c:8574
invoke_info
Definition: tcltklib.c:8470
arg
arg
Definition: ripper.y:1315

Definition at line 5655 of file bigdecimal.c.

Referenced by add_char_amb_opt_map_info(), add_ctype_to_cc_by_range(), add_heap_slots(), add_packed_direct(), allocate(), allocate_sorted_heaps(), alt_merge_opt_exact_info(), alt_merge_opt_map_info(), and_code_range1(), and_code_range_buf(), append_extmod(), apply2files(), ary2ptr_dispparams(), ary2safe_array_index(), ary_add_hash(), ary_add_hash_by(), ary_join_0(), ary_join_1(), ary_new_dim(), ary_reject(), ary_reject_bang(), backtrace_collect(), backtrace_each(), backtrace_mark(), base64decode(), big2dbl(), big2str_orig(), big_fdiv(), big_lshift(), big_rshift(), bigadd_core(), bigadd_int(), bigand_int(), bigdivrem(), bigdivrem1(), biglsh_bang(), BigMath_s_exp(), BigMath_s_log(), bigmul1_balance(), bigmul1_karatsuba(), bigmul1_normal(), bigor_int(), bigrsh_bang(), bigsqr_fast(), bigsub_core(), bigsub_int(), bigxor_int(), bigzero_p(), bitset_and(), bitset_copy(), bitset_invert(), bitset_invert_to(), bitset_is_empty(), bitset_or(), bitset_set_range(), bm_search(), bsock_setsockopt(), bubblebabble_str_new(), c_find_ldom(), c_find_ldoy(), call_queue_mark(), callback(), check_class(), check_exec_fds(), check_exec_fds_1(), check_exec_redirect1(), chfunc(), clear_coverage_i(), cmp(), code_page(), collect_caller_bindings(), collect_local_variables_in_iseq(), compat_init_setproctitle(), compile_array_(), compile_massign_opt(), compile_quantifier_node(), compile_tree(), compile_tree_n_times(), concat_opt_exact_info(), concat_opt_exact_info_str(), convert_type(), count_nodes(), count_objects(), count_objects_size(), coverage(), d2b(), d_lite_plus(), date__strptime_internal(), date_strftime_with_tmx(), date_zone_to_diff(), day_num(), dbl2big(), decorate_convpath(), delpair(), diff(), dir_globs(), disable_noname_group_capture(), dlhandle_sym(), dln_find_1(), dup2(), dvar_defined_gen(), e2w_combining(), econv_convpath(), econv_equal(), enc_autoload(), enc_pred_char(), enc_succ_char(), encodes(), enum_cycle(), enum_reverse_each(), enum_sort_by(), enum_zip(), env_each_key(), env_each_pair(), env_each_value(), env_inspect(), env_reject_bang(), env_replace(), env_select_bang(), env_size(), env_values_at(), envix(), error_print(), EVENTSINK_Invoke(), expand_case_fold_string_alt(), fdbm_delete_if(), fdbm_length(), fdbm_values_at(), fetch_named_backref_token(), fgdbm_delete_if(), fgdbm_length(), fgdbm_values_at(), fiddle_handle_sym(), filename_completion_proc_call(), find_coclass(), find_i(), find_packed_index(), find_str_position(), first_i(), fix_abs(), fix_aref(), fix_succ(), flatten(), flo_cmp(), flock_winnt(), foletype_s_progids(), foletypelib_s_typelibs(), folevariant_s_array(), for(), free_unused_heaps(), fsdbm_delete_if(), fsdbm_length(), fsdbm_values_at(), function_call(), gc_profile_dump_on(), gc_profile_record_get(), gc_profile_total_time(), generate_json_array(), generate_json_object(), get2comp(), get_addr(), get_backup_filename(), get_dyna_var_idx_at_raw(), get_line_info(), get_loaded_features_index(), get_max_match_length(), get_min_match_length(), getaddrinfo(), getnameinfo(), getpair(), gmtimew_noleapsecond(), hash2named_arg(), hash2ptr_dispparams(), hexencode_str_new(), hist_delete_at(), hist_each(), hist_get(), httpdate_type1_cb(), httpdate_type2_cb(), httpdate_type3_cb(), i2b(), i_apply_case_fold(), i_renumber_name(), if(), init_by_array(), Init_curses(), init_des(), Init_Encoding(), init_mark_stack(), Init_Object(), Init_ossl_asn1(), Init_ossl_ssl(), Init_RandomSeed(), initialize(), inject_i(), inject_op_i(), insn_make_insn_table(), insn_operand_intern(), inspect_ary(), inspect_errno(), inspect_int(), inspect_struct(), int_chr(), int_dotimes(), int_downto(), int_pair_to_real_inclusive(), int_pred(), int_sip_pad_final_block(), int_sip_round(), int_succ(), int_upto(), intern_str(), invoke_block_from_c(), io_puts_ary(), io_wait_readable(), io_wait_writable(), is_command_com(), is_not_included(), is_onechar_cclass(), iseq_build_from_ary_body(), iseq_build_from_ary_exception(), iseq_compile_each(), iseq_data_to_ary(), iseq_load(), iseq_set_arguments(), iseq_set_exception_table(), iseq_set_optargs_table(), iso2022jp_check_conv(), iso8601_bas_datetime_cb(), iso8601_ext_datetime_cb(), iso8601_ext_time_cb(), jisx0301_cb(), lazy_flat_map_func(), lazy_flat_map_to_ary(), lazy_grep_func(), lazy_grep_iter(), lazy_zip(), lazy_zip_arrays_func(), lazy_zip_func(), lgamma_r(), limited_big_rand(), limited_rand(), loaded_feature_path(), local_id_gen(), lshift(), m_core_hash_from_ary(), m_core_hash_merge_ary(), m_core_hash_merge_ptr(), magic_comment_marker(), main(), make_econv_exception(), make_struct(), map_position_value(), match_array(), match_at(), match_begin(), match_end(), match_inspect(), match_inspect_name_iter(), match_offset(), max_by_i(), max_i(), max_ii(), MD5_Finish(), md5_process(), mem_is_in_memp(), mime_begin(), mime_begin_strict(), mime_putc(), min_by_i(), min_i(), min_ii(), minmax_by_i(), minmax_i(), minmax_i_update(), minmax_ii(), minmax_ii_update(), mk_ary_of_str(), mon_num(), month_arg(), moreswitches(), mt_state(), multadd(), n2i(), name_add(), name_err_mesg_equal(), new_insn_body(), new_size(), nfc_getc(), nkf_enc_find_index(), nkf_split_options(), nkf_str_caseeql(), node_new_backref(), node_new_cclass_by_codepoint_range(), not_code_range_buf(), nsdr(), num_step(), numchar_getc(), objspace_each_objects(), ole_docinfo_from_type(), ole_invoke(), ole_invoke2(), ole_method_event(), ole_method_params(), ole_method_sub(), ole_methods_from_typeinfo(), ole_methods_sub(), ole_search_event(), ole_search_event_at(), ole_set_safe_array(), ole_type_impl_ole_types(), ole_types_from_typelib(), ole_val_ary2variant_ary(), ole_variables(), ole_variant2val(), oleclass_from_typelib(), olemethod_from_typeinfo(), oletypelib_search_registry(), onig_compile(), onig_name_to_backref_number(), onig_number_of_capture_histories(), onig_region_clear(), onig_region_copy(), onigenc_apply_all_case_fold_with_map(), onigenc_ascii_apply_all_case_fold(), onigenc_get_case_fold_codes_by_str_with_map(), onigenc_mbn_mbc_case_fold(), onigenc_mbn_mbc_to_code(), open_ifs_socket(), open_mime(), opt_enc_index(), optimize_node_left(), options(), or_code_range_buf(), ossl_pkcs7_get_recipient(), ossl_pkcs7_get_signer(), ossl_pkcs7_sym2typeid(), ossl_ssl_get_peer_cert_chain(), ossl_ssl_session_to_pem(), ossl_ssl_shutdown(), ossl_sslctx_add_extra_chain_cert_i(), ossl_sslctx_get_ciphers(), ossl_sslctx_initialize(), ossl_sslctx_set_ciphers(), ossl_sslctx_set_ssl_version(), ossl_sslctx_setup(), ossl_x509_get_extensions(), ossl_x509_set_extensions(), ossl_x509_verify(), ossl_x509crl_get_extensions(), ossl_x509crl_get_revoked(), ossl_x509crl_set_extensions(), ossl_x509crl_set_revoked(), ossl_x509name_to_a(), ossl_x509req_get_attributes(), ossl_x509req_set_attributes(), ossl_x509req_verify(), ossl_x509revoked_get_extensions(), ossl_x509revoked_set_extensions(), ossl_x509stctx_get_chain(), pack_pack(), pack_unpack(), parse_char_class(), parse_enclose(), parse_main(), parse_posix_bracket(), parser_magic_comment(), parser_set_encode(), parser_yyerror(), path_entries(), path_s_glob(), PEM_def_callback(), permute0(), pow5mult(), power_cache_get_power(), power_cache_get_power0(), power_cache_init(), process_options(), pty_close_pty(), qpencode(), quad_buf_complement(), r_long(), r_object0(), rand_init(), range_each(), range_step(), rb_ary_and(), rb_ary_assoc(), rb_ary_collect(), rb_ary_collect_bang(), rb_ary_combination(), rb_ary_count(), rb_ary_cycle(), rb_ary_diff(), rb_ary_drop_while(), rb_ary_each(), rb_ary_each_index(), rb_ary_fill(), rb_ary_includes(), rb_ary_index(), rb_ary_initialize(), rb_ary_join(), rb_ary_new3(), rb_ary_or(), rb_ary_permutation(), rb_ary_product(), rb_ary_rassoc(), rb_ary_repeated_combination(), rb_ary_repeated_permutation(), rb_ary_rindex(), rb_ary_sample(), rb_ary_select(), rb_ary_shuffle_bang(), rb_ary_take_while(), rb_ary_transpose(), rb_ary_uniq(), rb_ary_uniq_bang(), rb_ary_zip(), rb_backtrace_print_as_bugreport(), rb_big_and(), rb_big_aref(), rb_big_neg(), rb_big_or(), rb_big_pack(), rb_big_unpack(), rb_big_xor(), rb_check_argv(), rb_check_backtrace(), rb_construct_expanded_load_path(), rb_cstr_to_inum(), rb_dlcfunc_call(), rb_dvar_defined(), rb_econv_add_transcoder_at(), rb_econv_binmode(), rb_econv_close(), rb_econv_init_by_convpath(), rb_econv_memsize(), rb_econv_open(), rb_econv_open_by_transcoder_entries(), rb_enc_find_index(), rb_enc_get_index(), rb_env_clear(), rb_exec_fillarg(), rb_execarg_fixup(), rb_execarg_run_options(), rb_f_global_variables(), rb_f_kill(), rb_f_local_variables(), rb_f_p_internal(), rb_f_select(), rb_feature_p(), rb_file_join(), rb_find_file_ext_safe(), rb_find_file_safe(), rb_fix_rshift(), rb_funcall(), rb_get_next_signal(), rb_get_values_at(), rb_hash_s_create(), rb_hash_values_at(), rb_id2str(), rb_insns_name(), rb_insns_name_array(), rb_io_print(), rb_io_puts(), rb_iseq_build_for_ruby2cext(), rb_iseq_build_from_ary(), rb_iseq_disasm(), rb_iseq_parameters(), rb_iseq_translate_threaded_code(), rb_ivar_count(), rb_ivar_set(), rb_local_defined(), rb_memsearch_qs(), rb_memsearch_qs_utf8(), rb_mod_attr_accessor(), rb_mod_attr_reader(), rb_mod_attr_writer(), rb_mod_include(), rb_mod_modfunc(), rb_mod_prepend(), rb_mod_remove_method(), rb_mod_undef_method(), rb_obj_extend(), rb_objspace_call_finalizer(), rb_objspace_free(), rb_proc_exec_n(), rb_random_bytes(), rb_reg_match_last(), rb_reg_preprocess_dregexp(), rb_reg_s_union(), rb_scan_args(), rb_stat_inspect(), rb_str_count(), rb_str_delete_bang(), rb_str_end_with(), rb_str_enumerate_bytes(), rb_str_enumerate_chars(), rb_str_format(), rb_str_include(), rb_str_slice_bang(), rb_str_split_m(), rb_str_squeeze_bang(), rb_str_start_with(), rb_strftime_with_timespec(), rb_struct_aref(), rb_struct_aref_id(), rb_struct_aset(), rb_struct_aset_id(), rb_struct_each(), rb_struct_each_pair(), rb_struct_getmember(), rb_struct_new(), rb_struct_s_def(), rb_struct_select(), rb_struct_set(), rb_struct_to_h(), rb_threadptr_pending_interrupt_check_mask(), rb_threadptr_pending_interrupt_deque(), rb_threadptr_pending_interrupt_include_p(), rb_trans_conv(), rb_uint2big(), rb_vm_bugreport(), rb_vm_mark(), rb_vmdebug_debug_print_pre(), rb_vmdebug_env_dump_raw(), rb_w32_fdclr(), rb_w32_map_errno(), rb_w32_strerror(), rb_yield_values(), rb_zlib_crc_table(), readline_attempted_completion_function(), recalc_add_ruby_vm_event_flags(), recalc_remove_ruby_vm_event_flags(), recursive_cmp(), recursive_eql(), recursive_equal(), recursive_hash(), reduce0(), reg_named_captures_iter(), reinit(), renumber_node_backref(), rfc2822_cb(), rfc3339_cb(), RMD160_Finish(), RMD160_Update(), rpermute0(), rsa_generate(), rt_complete_frags(), ruby_dtoa(), ruby_float_step(), ruby_set_argv(), ruby_setenv(), ruby_strtod(), run_exec_close(), run_exec_dup2(), run_exec_dup2_child(), run_exec_open(), run_finalizer(), s2b(), scan_env_add_mem_entry(), scan_env_clear(), scan_once(), seepair(), select_end(), select_internal(), set_arg0(), set_bm_backward_skip(), set_bm_skip(), set_const_visibility(), set_method_visibility(), set_optimize_map_info(), set_state_ivars(), setup_args(), setup_tree(), SHA1_Finish(), SHA1_Update(), SHA256_End(), SHA384_End(), SHA512_End(), signbit(), sockopt_bool(), sockopt_int(), sockopt_s_bool(), sockopt_s_int(), sort_by_i(), st_cleanup_safe(), st_clear(), st_delete(), st_delete_safe(), st_foreach(), st_foreach_check(), st_get_key(), st_hash_uint(), st_insert(), st_insert2(), st_lookup(), st_update(), STACK_OF(), start_document(), str_exist_check_with_esc(), strdup_with_null(), string2hex(), strscan_aref(), strscan_rest_size(), strscan_set_pos(), stub_sysinit(), swallow(), test_check(), tgamma(), time_mdump(), time_mload(), time_timespec(), tr_setup_table(), tr_trans(), tracepoint_new_s(), trans_sweep(), type_cclass_hash(), typeinfo_from_ole(), typelib_file_from_typelib(), unicode_iconv_combine(), unknown_keyword_error(), unpack_entries(), unset_addr_list_fix(), update_char_offset(), update_string_node_case_fold(), usage(), username_completion_proc_call(), vm_call0_body(), vm_call_iseq_setup_normal(), vm_call_iseq_setup_tailcall(), vm_call_opt_send(), vm_callee_setup_arg_complex(), vm_callee_setup_keyword_arg(), vm_caller_setup_args(), vm_exec(), vm_expandarray(), vm_make_env_each(), vm_push_frame(), vm_throw(), vm_yield_setup_block_args(), vm_yield_setup_block_args_complex(), VpAddSub(), VpAlloc(), VpCtoV(), VpDivd(), VpDtoV(), VpFormatSt(), VpMult(), VpNmlz(), VpSzMantissa(), vtable_included(), vtable_tblcpy(), w16e_conv(), w_long(), w_object(), w_objivar(), warn_unused_var(), wmap_finalize(), x0213_combining_p(), x0213_wait_combining_p(), X509_CRL_sort(), xmlschema_datetime_cb(), xmlschema_time_cb(), xmlschema_trunc_cb(), zip_ary(), and zip_i().

ID id_banker
| static

Definition at line 55 of file bigdecimal.c.

Referenced by check_rounding_mode(), and Init_bigdecimal().

ID id_BigDecimal_exception_mode
| static

Definition at line 44 of file bigdecimal.c.

Referenced by Init_bigdecimal(), and VpGetException().

ID id_BigDecimal_precision_limit
| static

Definition at line 46 of file bigdecimal.c.

Referenced by Init_bigdecimal(), and VpGetPrecLimit().

ID id_BigDecimal_rounding_mode
| static

Definition at line 45 of file bigdecimal.c.

Referenced by Init_bigdecimal(), and VpGetRoundMode().

ID id_ceil
| static

Definition at line 57 of file bigdecimal.c.

Referenced by check_rounding_mode(), and Init_bigdecimal().

ID id_ceiling
| static

Definition at line 56 of file bigdecimal.c.

Referenced by check_rounding_mode(), and Init_bigdecimal().

ID id_default
| static

Definition at line 52 of file bigdecimal.c.

Referenced by check_rounding_mode(), and Init_bigdecimal().

ID id_down
| static

Definition at line 49 of file bigdecimal.c.

Referenced by check_rounding_mode(), and Init_bigdecimal().

ID id_eq
| static

Definition at line 60 of file bigdecimal.c.

Referenced by Init_bigdecimal(), is_one(), and is_zero().

ID id_floor
| static

Definition at line 58 of file bigdecimal.c.

Referenced by check_rounding_mode(), and Init_bigdecimal().

ID id_half_down
| static

Definition at line 53 of file bigdecimal.c.

Referenced by check_rounding_mode(), and Init_bigdecimal().

ID id_half_even
| static

Definition at line 54 of file bigdecimal.c.

Referenced by check_rounding_mode(), and Init_bigdecimal().

ID id_half_up
| static

Definition at line 51 of file bigdecimal.c.

Referenced by check_rounding_mode(), and Init_bigdecimal().

ID id_to_r
| static

Definition at line 59 of file bigdecimal.c.

Referenced by GetVpValueWithPrec(), and Init_bigdecimal().

ID id_truncate
| static

Definition at line 50 of file bigdecimal.c.

Referenced by check_rounding_mode(), and Init_bigdecimal().

ID id_up
| static

Definition at line 48 of file bigdecimal.c.

Referenced by check_rounding_mode(), and Init_bigdecimal().

VP_EXPORT int

Initial value:
{
if(VpIsNaN(a)) {
sprintf(psz,SZ_NaN);
return 1;
}
if(VpIsPosInf(a)) {
if(fPlus==1) {
*psz++ = ' ';
} else if(fPlus==2) {
*psz++ = '+';
}
sprintf(psz,SZ_INF);
return 1;
}
if(VpIsNegInf(a)) {
sprintf(psz,SZ_NINF);
return 1;
}
if(VpIsZero(a)) {
if(VpIsPosZero(a)) {
if(fPlus==1) sprintf(psz, " 0.0");
else if(fPlus==2) sprintf(psz, "+0.0");
else sprintf(psz, "0.0");
} else sprintf(psz, "-0.0");
return 1;
}
return 0
a
Real * a
Definition: bigdecimal.c:1182
VpIsPosInf
#define VpIsPosInf(a)
Definition: bigdecimal.h:270
VpIsPosZero
#define VpIsPosZero(a)
Definition: bigdecimal.h:258
SZ_INF
#define SZ_INF
Definition: bigdecimal.h:82
VpIsNaN
#define VpIsNaN(a)
Definition: bigdecimal.h:266
SZ_NINF
#define SZ_NINF
Definition: bigdecimal.h:84
VpIsNegInf
#define VpIsNegInf(a)
Definition: bigdecimal.h:271
VpIsZero
#define VpIsZero(a)
Definition: bigdecimal.h:260
SZ_NaN
#define SZ_NaN
Definition: bigdecimal.h:81

Definition at line 5050 of file bigdecimal.c.

Referenced by add_compile_string_length(), appendline(), ary2ptr_dispparams(), big_lshift(), big_rshift(), bigadd_int(), bigand_int(), biglsh_bang(), bigor_int(), bigrsh_bang(), bigsub_int(), bigxor_int(), bn_rand_range(), BSD_vfprintf(), bsock_setsockopt(), c_civil_to_jd(), c_jd_to_civil(), c_jd_to_weeknum(), calc_tm_yday(), chkpage(), compile_array_(), compile_massign(), concat_left_node_opt_info(), constat_parse(), d2b(), d_lite_plus(), d_lite_rshift(), date__strptime_internal(), date_strftime_with_tmx(), date_zone_to_diff(), day_num(), decode_year(), dlhandle_sym(), do_ioctl(), do_select(), double2timeval(), enc_names_i(), enc_set_filesystem_encoding(), enum_inject(), ffs(), fgdbm_delete_if(), fgdbm_has_key(), fiddle_handle_sym(), fill_cbuf(), fill_random_seed(), finish_writeconv(), fitpair(), flo_to_s(), get_char_length_tree1(), gmtime_with_leapsecond(), if(), io_binwrite(), io_encname_bom_p(), io_fillbuf(), io_flush_buffer_sync(), io_ungetbyte(), iseq_compile_each(), iseq_set_arguments(), iseq_set_exception_table(), iseq_set_local_table(), marshal_load(), mon_num(), nogvl_copy_stream_write(), obj_ivar_each(), offset_to_sec(), ole_invoke2(), onig_bbuf_init(), onig_node_str_cat(), onig_scan_unsigned_number(), onigenc_ascii_apply_all_case_fold(), onigenc_with_ascii_strncmp(), onigenc_with_ascii_strnicmp(), options(), ossl_dsa_to_der(), ossl_rsa_to_der(), overlapped_socket_io(), pack_pack(), pack_unpack(), parser_nextc(), parser_parse_string(), parser_yyerror(), process_options(), r_byte1_buffered(), r_bytes1(), r_bytes1_buffered(), r_object0(), rand_init(), random_load(), rb_enc_aliases_enc_i(), rb_enc_mbclen(), rb_f_system(), rb_file_expand_path_internal(), rb_fix2str(), rb_float_new(), rb_gdbm_delete(), rb_gdbm_fetch2(), rb_gdbm_nextkey(), rb_getaddrinfo(), rb_getnameinfo(), rb_id2str(), rb_io_getline_fast(), rb_io_ungetc(), rb_iseq_translate_threaded_code(), rb_locale_charmap(), rb_num_to_uint(), rb_str_buf_cat_escaped_char(), rb_str_drop_bytes(), rb_str_format(), rb_str_inspect(), rb_strftime_with_timespec(), rb_sysopen_internal(), rb_vmdebug_debug_print_pre(), rb_w32_getppid(), rb_w32_map_errno(), rb_w32_select_with_thread(), rb_w32_strerror(), rb_wait_for_single_fd(), read_buffered_data(), recvmsg(), reduce_nodes_gen(), rsa_generate(), rsock_connect(), rsock_s_accept(), ruby_dtoa(), ruby_each_words(), ruby_scan_hex(), ruby_scan_oct(), ruby_snprintf(), ruby_strtod(), ruby_vsnprintf(), scan_unsigned_hexadecimal_number(), sendmsg(), set_bm_backward_skip(), set_bm_skip(), set_optimize_exact_info(), set_optimize_map_info(), SHA256_Final(), SHA256_Update(), SHA512_Last(), SHA512_Update(), socklist_delete(), socklist_lookup(), st_hash(), str_end_cmp(), str_end_hash(), swallow(), switch(), thread_fd_close_i(), time_mdump(), time_mload(), time_timespec(), timelocalw(), to_ascii(), tr_trans(), transcode_restartable0(), type_cclass_hash(), udp_send(), vm_define_method(), vm_throw(), w_float(), w_long(), w_object(), yaml_emitter_write_double_quoted_scalar(), yaml_parser_save_simple_key(), yaml_parser_scan_block_scalar_breaks(), zstream_run(), and zstream_run_func().

ioffset = nf - ix*(ssize_t)BASE_FIG

Definition at line 5655 of file bigdecimal.c.

ix = nf / (ssize_t)BASE_FIG

Definition at line 5655 of file bigdecimal.c.

Referenced by BigDecimal_div2(), f_mul(), for(), and safe_mul_p().

BDIGIT m

Definition at line 5085 of file bigdecimal.c.

Referenced by AddExponent(), BigDecimal_load(), BigMath_s_exp(), BigMath_s_log(), bm_init_skip(), c_gregorian_last_day_of_month(), c_gregorian_to_yday(), c_jd_to_civil(), c_julian_last_day_of_month(), c_julian_to_yday(), c_valid_gregorian_p(), c_valid_julian_p(), calc_wday(), convert_type(), d_lite_rshift(), date__strptime_internal(), date_s_civil(), date_s_today(), datetime_s_civil(), datetime_s_now(), delpair(), distance_multiply(), enum_minmax(), enum_minmax_by(), eval_string_with_cref(), extract_fd(), get_c_civil(), get_c_time(), get_s_civil(), glob_make_pattern(), if(), int_pair_to_real_inclusive(), int_sip_final(), int_sip_pre_update(), int_sip_update(), intern_str(), is_special_global_name(), lazy_init_iterator(), match(), mem_is_in_memp(), method_hash(), murmur(), of2str(), power_cache_get_power(), range_dumper(), rb_ary_product(), rb_enc_symname_type(), rb_io_modestr_fmode(), rb_memsearch_qs(), rb_memsearch_qs_utf8(), rb_memsearch_ss(), rb_mod_included_modules(), rb_mod_modfunc(), rb_mutex_allow_trap(), rb_thread_shield_wait(), rb_w32_asynchronize(), reg_compile_gen(), ruby_qsort(), s3e(), sip_hash24(), strio_init(), subx(), switch(), systemtime_to_tm(), time_to_date(), time_to_datetime(), valid_civil_sub(), vm_callee_setup_arg_complex(), vm_search_super_method(), vm_yield_setup_block_args(), vm_yield_setup_block_args_complex(), and VpSzMantissa().

mx = a->Prec + vabs(a->exponent)

Definition at line 1183 of file bigdecimal.c.

Referenced by BigDecimal_abs(), BigDecimal_add(), BigDecimal_ceil(), BigDecimal_divremain(), BigDecimal_DoDivmod(), BigDecimal_fix(), BigDecimal_floor(), BigDecimal_frac(), BigDecimal_mult(), BigDecimal_round(), BigDecimal_sqrt(), BigDecimal_sub(), BigDecimal_truncate(), GetAddSubPrec(), VpAlloc(), and VpComp().

n = (ssize_t)BASE_FIG - ioffset - 1

Definition at line 5655 of file bigdecimal.c.

Referenced by add_char_amb_opt_map_info(), add_code_range_to_buf0(), add_ctype_to_cc_by_range(), AddExponent(), and_code_range1(), argf_lineno_setter(), ary_take_first_or_last(), autoload_delete(), backtrace_collect(), big_op(), big_split(), BigDecimal_div2(), BigDecimal_power(), BigDecimal_sqrt(), BigMath_s_exp(), BigMath_s_log(), bigmul1_balance(), bigmul1_karatsuba(), bigmul1_single(), bigmul1_toom3(), bn_rand_range(), BSD_vfprintf(), check_exec_redirect1(), chkpage(), class2path(), classname(), compile_anchor_node(), compile_length_tree(), compile_quantifier_node(), compile_tree(), compile_tree_n_times(), cont_memsize(), copy_stream_fallback_body(), coverage(), curses_curs_set(), d_lite_next_day(), d_lite_next_month(), d_lite_next_year(), d_lite_prev_day(), d_lite_prev_month(), d_lite_prev_year(), date__strptime_internal(), date_strftime_with_tmx(), decorate_convpath(), default_proc_arity_check(), delpair(), dt_lite_iso8601(), dt_lite_jisx0301(), each_with_index_i(), econv_putback(), enc_arg(), entry_repeat_range(), enum_cycle(), enum_cycle_size(), enum_each_cons_size(), enum_each_slice_size(), expand_case_fold_string(), f_divide(), f_round_common(), fc_path(), fdbm_delete_if(), fgdbm_delete_if(), fill_random_seed(), first_i(), fitpair(), float_decode_internal(), float_rationalize(), float_to_r(), fole_missing(), fole_s_free(), fsdbm_delete_if(), gc_mark_locations(), get_head_value_node(), getpair(), GetPositiveInt(), gmtimew_noleapsecond(), gzfile_get16(), gzfile_get32(), gzfile_reader_rewind(), gzreader_charboundary(), gzreader_gets(), gzreader_skip_linebreaks(), Init_ossl_rsa(), int_round(), int_round_0(), int_sip_round(), io_binwrite(), io_bufread(), io_getc(), io_getpartial(), io_nread(), io_read(), io_ready_p(), io_wait_readable(), io_write(), is_console(), is_onechar_cclass(), is_readable_console(), is_readable_pipe(), iseq_compile_each(), iso8601_timediv(), join_argv(), loaded_feature_path(), lshift(), make_econv_exception(), make_errno_exc(), make_errno_exc_str(), make_exception(), make_no_method_exception(), match_at(), memmove(), method_arity_m(), minmax_by_i(), minmax_i(), minmax_i_update(), minmax_ii(), minmax_ii_update(), minus_dd(), must_not_be_anonymous(), new_code_range(), next_setup(), nl_langinfo_codeset(), node_new_cclass_by_codepoint_range(), node_newnode(), not_code_range_buf(), nsdr(), nucomp_expt(), nucomp_hash(), num_interval_step_size(), nurat_hash(), offset_to_sec(), ole_invoke(), ole_mb2wc(), ole_set_safe_array(), onig_free_node_list(), onig_is_in_code_range(), onig_match(), onig_name_to_backref_number(), onig_node_free(), onig_node_list_add(), onig_number_of_capture_histories(), onig_region_resize(), onig_search_gpos(), onigenc_mbn_mbc_to_code(), onigenc_strlen(), onigenc_strlen_null(), open_key_args(), optimize_node_left(), ossl_rand_bytes(), ossl_rand_egd_bytes(), ossl_rand_pseudo_bytes(), parse_frag_cb(), parser_magic_comment(), parser_set_encode(), parser_tokspace(), parser_whole_match_p(), path_binread(), path_each_line(), path_open(), path_read(), path_readlines(), path_s_glob(), path_sysopen(), permute0(), proc_exec_cmd(), proc_options(), process_sflag(), putpair(), qpencode(), quorem(), r_byte1_buffered(), r_bytes1(), r_bytes1_buffered(), r_symreal(), range_first(), rb_ary_combination(), rb_ary_combination_size(), rb_ary_compact_bang(), rb_ary_count(), rb_ary_cycle(), rb_ary_cycle_size(), rb_ary_new3(), rb_ary_permutation(), rb_ary_permutation_size(), rb_ary_pop(), rb_ary_product(), rb_ary_repeated_combination(), rb_ary_repeated_combination_size(), rb_ary_repeated_permutation(), rb_ary_repeated_permutation_size(), rb_ary_rotate_bang(), rb_ary_sample(), rb_ary_shift_m(), rb_big_minus(), rb_big_plus(), rb_const_remove(), rb_cstr_to_dbl(), rb_deflate_params(), rb_econv_add_transcoder_at(), rb_econv_open_by_transcoder_entries(), rb_econv_putback(), rb_enc_codelen(), rb_enc_mbclen(), rb_enc_precise_mbclen(), rb_enc_uint_chr(), rb_feature_p(), rb_file_expand_path_internal(), rb_file_s_basename(), rb_file_s_chmod(), rb_file_s_chown(), rb_file_s_unlink(), rb_file_s_utime(), rb_funcall(), rb_hash_reject_bang(), rb_hash_select_bang(), rb_int2big(), rb_io_each_codepoint(), rb_io_sysread(), rb_io_syswrite(), rb_io_write_nonblock(), rb_iseq_disasm(), rb_memsearch_qs(), rb_memsearch_qs_utf8(), rb_memsearch_ss(), rb_mod_remove_cvar(), rb_node_newnode(), rb_obj_remove_instance_variable(), rb_parser_calloc(), rb_parser_free(), rb_parser_malloc(), rb_parser_realloc(), rb_reg_expr_str(), rb_reg_s_last_match(), rb_str_capitalize_bang(), rb_str_count(), rb_str_downcase_bang(), rb_str_dump(), rb_str_enumerate_chars(), rb_str_enumerate_codepoints(), rb_str_enumerate_lines(), rb_str_format(), rb_str_inspect(), rb_str_justify(), rb_str_lstrip_bang(), rb_str_split_m(), rb_str_swapcase_bang(), rb_str_times(), rb_str_upcase_bang(), rb_str_upto(), rb_strftime_with_timespec(), rb_struct_initialize_m(), rb_tmp_class_path(), rb_uint2big(), rb_vm_bugreport(), rb_yield_values(), rcombinate0(), read_all(), read_buffered_data(), recursive_hash(), reference_count(), remove_begin(), renumber_node_backref(), rpermute0(), rsock_bsock_send(), rt_complete_frags(), ruby__sfvwrite(), ruby_enc_find_basename(), ruby_float_step(), ruby_float_step_size(), ruby_glob0(), ruby_qsort(), ruby_xrealloc2(), run_exec_dup2(), run_exec_dup2_tmpbuf_size(), sdbm_hash(), sdbm_open(), seepair(), select_internal(), set_bm_skip(), set_quantifier(), slow_search(), sock_connect(), sock_connect_nonblock(), sort_1(), sort_2(), splpage(), st_numhash(), stack_double(), str_byte_substr(), str_end_with_asciichar(), str_gsub(), str_node_split_last_char(), str_nth_len(), str_strlen(), strio_each_codepoint(), strio_getline(), struct_alloc(), sym_printable(), test_check(), time_cmp(), timelocalw(), trnext(), udp_send(), unnamed_parameters(), utc_offset_arg(), utf8_to_uv(), vm_backtrace_to_ary(), VpAddSub(), VpAsgn(), VpDivd(), VpExponent10(), VpPower(), VpSetRoundMode(), VpSqrt(), VpSzMantissa(), wdivmod(), xmalloc2_size(), yycompile0(), zip_ary(), and zstream_run_func().

nf = y->exponent * (ssize_t)BASE_FIG

Definition at line 5659 of file bigdecimal.c.

Referenced by BigDecimal_limit(), BigDecimal_to_i(), if(), ruby_strtod(), VpAlloc(), and VpFormatSt().

BDIGIT nn

Definition at line 5085 of file bigdecimal.c.

Referenced by VpSzMantissa().

char* pszSav = psz

Definition at line 5086 of file bigdecimal.c.

r = BigDecimal_divide(&c, &res, &div, self, r)

Definition at line 1196 of file bigdecimal.c.

Referenced by add_code_range_to_buf0(), add_ctype_to_cc(), add_ctype_to_cc_by_range(), add_multi_byte_cclass(), add_opcode_option(), add_opcode_rel_addr(), addrinfo_list_new(), and_cclass(), and_code_range1(), and_code_range_buf(), backtrace_to_location_ary(), backtrace_to_str_ary(), backward_search_range(), bbuf_clone(), big2str_karatsuba(), bigmul1_balance(), BN_nnmod(), bracket(), check_type_tree(), class_instance_method_list(), compile_anchor_node(), compile_call(), compile_cclass_node(), compile_enclose_node(), compile_length_string_node(), compile_length_tree(), compile_option_node(), compile_quantifier_node(), compile_range_repeat_node(), compile_string_node(), compile_tree(), compile_tree_empty_check(), compile_tree_n_times(), convert_type(), disable_noname_group_capture(), do_select(), enum_size(), exc_to_s(), expand_case_fold_make_rem_string(), expand_case_fold_string(), expand_case_fold_string_alt(), f_divide(), f_imul(), fetch_char_property_to_ctype(), fetch_name(), fetch_name_with_level(), fetch_named_backref_token(), fetch_range_quantifier(), fetch_token(), ffs(), finish_writeconv(), fix_minus(), fix_mul(), fix_plus(), fnmatch_helper(), gc_profile_dump_on(), get_c_time(), get_char_length_tree1(), get_max_match_length(), get_min_match_length(), i_apply_case_fold(), i_names(), Init_RandomSeed(), int_pair_to_real_inclusive(), int_round_0(), int_sip_post_update(), io_binwrite(), io_fillbuf(), io_flush_buffer_sync(), io_getc(), io_unread(), m_ajd(), m_amjd(), make_regexp(), match_at(), mime_begin_strict(), minus_dd(), murmur(), new_args_gen(), new_code_range(), next_state_class(), next_state_val(), node_extended_grapheme_cluster(), nogvl_copy_stream_read_write(), noname_disable_map(), not_code_range_buf(), nucomp_expt(), numbered_ref_check(), onig_compile(), onig_match(), onig_names_free(), onig_new(), onig_new_with_source(), onig_new_without_alloc(), onig_parse_make_tree(), onig_region_copy(), onig_region_new(), onig_region_resize_clear(), onig_region_set(), onig_search_gpos(), onigenc_apply_all_case_fold_with_map(), onigenc_ascii_apply_all_case_fold(), onigenc_property_list_add_property(), onigenc_property_list_init(), optimize_node_left(), or_cclass(), or_code_range_buf(), overlapped_socket_io(), parse_branch(), parse_char_class(), parse_char_property(), parse_enclose(), parse_exp(), parse_posix_bracket(), parse_regexp(), parse_subexp(), permute0(), quantifiers_memory_node_info(), r_le(), r_lt(), r_object0(), rand_int(), rand_range(), rand_start(), range_values(), rb_ary_permutation(), rb_ary_repeated_permutation(), rb_enc_codepoint_len(), rb_f_rand(), rb_f_srand(), rb_io_each_codepoint(), rb_io_s_pipe(), rb_iseq_parameters(), rb_random_bytes(), rb_random_ulong_limited(), rb_reg_prepare_re(), rb_reset_random_seed(), rb_str_casecmp(), rb_str_strip_bang(), rb_thread_call_with_gvl(), rb_thread_s_handle_interrupt(), rb_w32_accept(), rb_w32_bind(), rb_w32_connect(), rb_w32_gethostbyaddr(), rb_w32_gethostbyname(), rb_w32_gethostname(), rb_w32_getpeername(), rb_w32_getprotobyname(), rb_w32_getprotobynumber(), rb_w32_getservbyname(), rb_w32_getservbyport(), rb_w32_getsockname(), rb_w32_getsockopt(), rb_w32_ioctlsocket(), rb_w32_listen(), rb_w32_select_with_thread(), rb_w32_setsockopt(), rb_w32_shutdown(), rb_w32_wrap_io_handle(), rb_wait_for_single_fd(), rcombinate0(), renumber_by_map(), rpermute0(), ruby_qsort(), select_single(), set_optimize_exact_info(), set_optimize_info_from_tree(), set_rawmode(), set_ttymode(), setup_look_behind(), setup_subexp_call(), setup_tree(), sock_s_getnameinfo(), socketpair_internal(), split_second(), strcat_capa(), strcat_capa_from_static(), strdup_with_null(), subexp_inf_recursive_check(), subexp_inf_recursive_check_trav(), subexp_recursive_check(), subexp_recursive_check_trav(), time_usec(), tr_trans(), update_string_node_case_fold(), valid_civil_p(), valid_commercial_p(), valid_ordinal_p(), valid_weeknum_p(), vm_backtrace_to_ary(), vm_yield_setup_block_args(), vm_yield_setup_block_args_complex(), wadd(), wdiv(), wdivmod(), wmod(), wsplit_p(), wsub(), and X509_CRL_sort().

VALUE rb_cBigDecimal

Definition at line 41 of file bigdecimal.c.

Referenced by BigDecimal_global_new(), Init_bigdecimal(), and VpCreateRbObject().

VALUE rb_mBigMath

Definition at line 42 of file bigdecimal.c.

Referenced by Init_bigdecimal().

Real * res =NULL

Definition at line 1233 of file bigdecimal.c.

Referenced by addrinfo_mload(), aligned_malloc(), allocate_converted_string(), BigDecimal_DoDivmod(), call_getaddrinfo(), econv_primitive_convert(), fc_i(), fill_cbuf(), finish_writeconv(), gc_prepare_free_objects(), gzreader_gets(), init_inetsock_internal(), ip_s_getaddress(), make_addrinfo(), pack_pack(), pruby_file_fetch_check_response(), pty_getpty(), rb_econv_convert0(), rb_econv_substr_append(), rb_getaddrinfo(), rb_str_crypt(), rb_str_justify(), rb_trans_conv(), rsock_getaddrinfo(), select_internal(), sock_s_getaddrinfo(), sock_s_getnameinfo(), sock_s_pack_sockaddr_in(), stack_chunk_alloc(), trans_sweep(), transcode_restartable(), udp_bind(), udp_connect_internal(), udp_send(), window_setscrreg(), and wrename().

return

Definition at line 5800 of file bigdecimal.c.

Referenced by alt_merge_opt_exact_info(), alt_merge_opt_map_info(), CC_DUP_WARN(), CC_ESC_WARN(), CLOSE_BRACKET_WITHOUT_ESC_WARN(), concat_opt_exact_info(), onig_node_free(), onig_reduce_nested_quantifier(), select_opt_exact_info(), select_opt_map_info(), and UNKNOWN_ESC_WARN().

shift = BASE1

Definition at line 5085 of file bigdecimal.c.

Referenced by nkf_each_char_to_hex(), r_object0(), rb_ary_modify(), rb_big_aref(), rb_big_lshift(), rb_big_rshift(), and ruby_brace_expand().

BDIGIT shifter

Definition at line 5656 of file bigdecimal.c.

return v = y->frac[ix]

Definition at line 5656 of file bigdecimal.c.

Referenced by add64_to(), addrinfo_mload(), argf_init(), ary2ptr_dispparams(), ary_add_hash_by(), ary_reject(), ary_reject_bang(), Bfree(), bigsqr_fast(), bsock_setsockopt(), case_when_optimizable_literal(), check_exec_redirect1(), CHECK_INTEGER(), chunk_ii(), cn_i(), coerce_rescue(), cos_i(), cparse_params_mark(), cto_i(), d_lite_hash(), date_strftime_with_tmx(), dir_s_glob(), each_cons_i(), each_slice_i(), econv_convpath(), econv_opts(), econv_primitive_convert(), enumerator_feed(), env_select(), establishShell(), extract_binmode(), fdbm_select(), fetch_escaped_value(), fgdbm_select(), fsdbm_select(), gmtimew_noleapsecond(), initialize_params(), insn_data_to_s_detail(), int_pow(), int_sip_dump(), is_not_included(), iseq_build_from_ary_exception(), iseq_set_sequence(), JSON_parse_array(), JSON_parse_object(), lazy_zip(), lazy_zip_func(), lexer_i(), lexer_iter(), loggamma(), mark_current_machine_context(), mark_locations_array(), marshal_load(), match_inspect(), math_lgamma(), max_by_i(), method_inspect(), min_by_i(), mnew(), more_char(), n2i(), new_insn_body(), next_state_val(), nucomp_hash(), num_exact(), nurat_hash(), objspace_each_objects(), ole_invoke(), ole_invoke2(), ole_propertyput(), open_dir_handle(), open_key_args(), os_obj_of_i(), ossl_sslctx_set_ciphers(), pack_pack(), pack_unpack(), parse_char_class(), parser_nextc(), path2class(), path2module(), proc_options(), process_sflag(), quantifiers_memory_node_info(), r_byte(), r_entry0(), r_leave(), r_object0(), racc_cparse(), racc_yyparse(), rand_random(), rand_range(), range_dumper(), range_each_func(), range_include(), range_init(), range_step(), rb_ary_and(), rb_ary_assoc(), rb_ary_bsearch(), rb_ary_cmp(), rb_ary_count(), rb_ary_delete(), rb_ary_fill(), rb_ary_or(), rb_ary_rassoc(), rb_ary_select_bang(), rb_ary_uniq(), rb_ary_uniq_bang(), rb_check_convert_type(), rb_check_to_integer(), rb_const_remove(), rb_convert_type(), rb_econv_asciicompat_encoding(), rb_econv_prepare_options(), rb_f_rand(), rb_feature_p(), rb_file_expand_path_internal(), rb_float_new(), rb_float_value(), rb_hash_s_create(), rb_io_extract_encoding_option(), rb_io_extract_modeenc(), rb_mod_remove_method(), rb_mod_to_s(), rb_mod_undef_method(), rb_num2fix(), rb_num_to_uint(), rb_obj_remove_instance_variable(), rb_print_undef(), rb_proc_exec_n(), rb_random_real(), rb_random_ulong_limited(), rb_reg_s_union(), rb_reg_s_union_m(), rb_stat_inspect(), rb_str_format(), rb_str_to_dbl(), rb_str_to_inum(), rb_time_unmagnify_to_float(), rb_to_integer(), rb_w32_aspawn_flags(), rb_w32_spawn(), rb_yield_splat(), read_all(), read_digits(), recursive_cmp(), recursive_hash(), reduce0(), rotl64_swap(), rotl64_to(), rsock_sockaddr_string_value(), RUBY_ALIAS_FUNCTION(), ruby_executable_node(), search_convpath_i(), set_const_visibility(), set_method_visibility(), sockopt_data(), sockopt_inspect(), sort_by_i(), st_hash_uint(), time_mdump(), time_round(), time_to_r(), timelocalw(), total_i(), tr_find(), vm_expandarray(), VpAlloc(), vtdate2rbtime(), vtm_add_offset(), w_object(), warn_unused_var(), wstati64(), xor64_to(), and zip_i().

VALUE
| static

Initial value:
{
ENTER(5)
ENTER
#define ENTER(n)
Definition: bigdecimal.c:63

Definition at line 1180 of file bigdecimal.c.

VP_EXPORT void

Initial value:
{
size_t i, n, ZeroSup
n
ssize_t n
Definition: bigdecimal.c:5655
i
ssize_t i
Definition: bigdecimal.c:5655

Definition at line 5083 of file bigdecimal.c.

Referenced by add_slot_local_freelist(), argf_next_argv(), CHECK_INTEGER(), chfunc(), date_strftime_with_tmx(), dlhandle_sym(), dln_load(), fiddle_handle_sym(), get_device_once(), getpage(), gzfile_getc(), if(), Init_ISeq(), Init_sym(), Init_tcltklib(), Init_Thread(), Init_VM(), iseq_build_from_ary_body(), iseq_build_from_ary_exception(), iseq_load(), load_lock(), make_io_deferred(), makroom(), mark_locations_array(), ossl_asn1_get_asn1type(), p_gid_change_privilege(), p_uid_change_privilege(), parse_exp(), parser_yylex(), putpair(), rand_random(), rb_cstr_to_rat(), rb_file_load_ok(), rb_io_advise(), rb_singleton_class(), rb_strftime_with_timespec(), RMD160_Finish(), RMD160_Update(), sdbm_close(), sdbm_firstkey(), sdbm_prep(), sdbm_store(), SHA1_Transform(), SHA1_Update(), slot_sweep(), splpage(), ssl_renegotiation_cb(), str_is_number(), string_to_c(), string_to_r(), trap_handler(), and zlib_mem_alloc().

Real* VpConstOne
| static

Definition at line 3245 of file bigdecimal.c.

Referenced by VpOne().

Real* VpPt5
| static

Definition at line 3246 of file bigdecimal.c.