rational.c File Reference
`#include "ruby.h"`
`#include "internal.h"`
`#include <math.h>`
`#include <float.h>`
`#include <assert.h>`
`#include <ctype.h>`

Go to the source code of this file.

## Macros

#define | NDEBUG
#define | ZERO INT2FIX(0)
#define | ONE INT2FIX(1)
#define | TWO INT2FIX(2)
#define | f_boolcast(x) ((x) ? Qtrue : Qfalse)
#define | binop(n, op)
#define | fun1(n)
#define | fun2(n)
#define | f_expt10(x) f_expt(INT2FIX(10), x)
#define | f_positive_p(x) (!f_negative_p(x))
#define | f_nonzero_p(x) (!f_zero_p(x))
#define | k_exact_p(x) (!k_float_p(x))
#define | k_inexact_p(x) k_float_p(x)
#define | k_exact_zero_p(x) (k_exact_p(x) && f_zero_p(x))
#define | k_exact_one_p(x) (k_exact_p(x) && f_one_p(x))
#define | get_dat1(x)
#define | get_dat2(x, y)
#define | rb_raise_zerodiv() rb_raise(rb_eZeroDivError, "divided by 0")
#define | id_ceil rb_intern("ceil")
#define | f_ceil(x) rb_funcall((x), id_ceil, 0)
#define | id_quo rb_intern("quo")
#define | f_quo(x, y) rb_funcall((x), id_quo, 1, (y))
#define | f_reciprocal(x) f_quo(ONE, (x))
#define | id_numerator rb_intern("numerator")
#define | f_numerator(x) rb_funcall((x), id_numerator, 0)
#define | id_denominator rb_intern("denominator")
#define | f_denominator(x) rb_funcall((x), id_denominator, 0)
#define | id_to_r rb_intern("to_r")
#define | f_to_r(x) rb_funcall((x), id_to_r, 0)
#define | id_lshift rb_intern("<<")
#define | f_lshift(x, n) rb_funcall((x), id_lshift, 1, (n))
#define | WS "\\s*"
#define | DIGITS "(?:[0-9](?:_[0-9]|[0-9])*)"
#define | NUMERATOR "(?:" DIGITS "?\\.)?" DIGITS "(?:[eE][-+]?" DIGITS ")?"
#define | DENOMINATOR DIGITS
#define | PATTERN "\\A" WS "([-+])?(" NUMERATOR ")(?:\\/(" DENOMINATOR "))?" WS
#define | id_match rb_intern("match")
#define | f_match(x, y) rb_funcall((x), id_match, 1, (y))
#define | id_split rb_intern("split")
#define | f_split(x, y) rb_funcall((x), id_split, 1, (y))
#define | id_gsub rb_intern("gsub")
#define | f_gsub(x, y, z) rb_funcall((x), id_gsub, 2, (y), (z))
#define | id_to_r rb_intern("to_r")
#define | f_to_r(x) rb_funcall((x), id_to_r, 0)
#define | rb_intern(str) rb_intern_const(str)

## Functions

static VALUE | f_add (VALUE x, VALUE y)
static VALUE | f_cmp (VALUE x, VALUE y)
static VALUE | f_div (VALUE x, VALUE y)
static VALUE | f_gt_p (VALUE x, VALUE y)
static VALUE | f_lt_p (VALUE x, VALUE y)
| binop (mod, '%')
static VALUE | f_sub (VALUE x, VALUE y)
| fun1 (abs)
static VALUE | f_to_f (VALUE x)
| fun1 (to_s)
| fun2 (expt)
static VALUE | f_zero_p (VALUE x)
static VALUE | f_one_p (VALUE x)
static VALUE | f_kind_of_p (VALUE x, VALUE c)
static VALUE | k_numeric_p (VALUE x)
static VALUE | k_integer_p (VALUE x)
static VALUE | k_float_p (VALUE x)
static VALUE | k_rational_p (VALUE x)
static long | i_gcd (long x, long y)
static VALUE | f_gcd (VALUE x, VALUE y)
static VALUE | f_lcm (VALUE x, VALUE y)
static VALUE | nurat_s_new_internal (VALUE klass, VALUE num, VALUE den)
static VALUE | nurat_s_alloc (VALUE klass)
static VALUE | f_rational_new_bang1 (VALUE klass, VALUE x)
static VALUE | f_rational_new_bang2 (VALUE klass, VALUE x, VALUE y)
static void | nurat_int_check (VALUE num)
static VALUE | nurat_int_value (VALUE num)
static VALUE | nurat_s_canonicalize_internal (VALUE klass, VALUE num, VALUE den)
static VALUE | nurat_s_canonicalize_internal_no_reduce (VALUE klass, VALUE num, VALUE den)
static VALUE | nurat_s_new (int argc, VALUE *argv, VALUE klass)
static VALUE | f_rational_new1 (VALUE klass, VALUE x)
static VALUE | f_rational_new2 (VALUE klass, VALUE x, VALUE y)
static VALUE | f_rational_new_no_reduce1 (VALUE klass, VALUE x)
static VALUE | f_rational_new_no_reduce2 (VALUE klass, VALUE x, VALUE y)
static VALUE | nurat_f_rational (int argc, VALUE *argv, VALUE klass)
static VALUE | nurat_numerator (VALUE self)
static VALUE | nurat_denominator (VALUE self)
static VALUE | f_imul (long a, long b)
static VALUE | f_addsub (VALUE self, VALUE anum, VALUE aden, VALUE bnum, VALUE bden, int k)
static VALUE | nurat_add (VALUE self, VALUE other)
static VALUE | nurat_sub (VALUE self, VALUE other)
static VALUE | f_muldiv (VALUE self, VALUE anum, VALUE aden, VALUE bnum, VALUE bden, int k)
static VALUE | nurat_mul (VALUE self, VALUE other)
static VALUE | nurat_div (VALUE self, VALUE other)
static VALUE | nurat_fdiv (VALUE self, VALUE other)
static VALUE | nurat_expt (VALUE self, VALUE other)
static VALUE | nurat_cmp (VALUE self, VALUE other)
static VALUE | nurat_eqeq_p (VALUE self, VALUE other)
static VALUE | nurat_coerce (VALUE self, VALUE other)
static VALUE | nurat_floor (VALUE self)
static VALUE | nurat_ceil (VALUE self)
static VALUE | nurat_truncate (VALUE self)
static VALUE | nurat_round (VALUE self)
static VALUE | f_round_common (int argc, VALUE *argv, VALUE self, VALUE(*func)(VALUE))
static VALUE | nurat_floor_n (int argc, VALUE *argv, VALUE self)
static VALUE | nurat_ceil_n (int argc, VALUE *argv, VALUE self)
static VALUE | nurat_truncate_n (int argc, VALUE *argv, VALUE self)
static VALUE | nurat_round_n (int argc, VALUE *argv, VALUE self)
static VALUE | nurat_to_f (VALUE self)
static VALUE | nurat_to_r (VALUE self)
static void | nurat_rationalize_internal (VALUE a, VALUE b, VALUE *p, VALUE *q)
static VALUE | nurat_rationalize (int argc, VALUE *argv, VALUE self)
static VALUE | nurat_hash (VALUE self)
static VALUE | f_format (VALUE self, VALUE(*func)(VALUE))
static VALUE | nurat_to_s (VALUE self)
static VALUE | nurat_inspect (VALUE self)
static VALUE | nurat_marshal_dump (VALUE self)
static VALUE | nurat_marshal_load (VALUE self, VALUE a)
VALUE | rb_rational_reciprocal (VALUE x)
VALUE | rb_gcd (VALUE self, VALUE other)
VALUE | rb_lcm (VALUE self, VALUE other)
VALUE | rb_gcdlcm (VALUE self, VALUE other)
VALUE | rb_rational_raw (VALUE x, VALUE y)
VALUE | rb_rational_new (VALUE x, VALUE y)
static VALUE | nurat_s_convert (int argc, VALUE *argv, VALUE klass)
VALUE | rb_Rational (VALUE x, VALUE y)
static VALUE | numeric_numerator (VALUE self)
static VALUE | numeric_denominator (VALUE self)
static VALUE | integer_numerator (VALUE self)
static VALUE | integer_denominator (VALUE self)
static VALUE | float_numerator (VALUE self)
static VALUE | float_denominator (VALUE self)
static VALUE | nilclass_to_r (VALUE self)
static VALUE | nilclass_rationalize (int argc, VALUE *argv, VALUE self)
static VALUE | integer_to_r (VALUE self)
static VALUE | integer_rationalize (int argc, VALUE *argv, VALUE self)
static void | float_decode_internal (VALUE self, VALUE *rf, VALUE *rn)
static VALUE | float_to_r (VALUE self)
static VALUE | float_rationalize (int argc, VALUE *argv, VALUE self)
static void | make_patterns (void)
static VALUE | string_to_r_internal (VALUE self)
static VALUE | string_to_r_strict (VALUE self)
static VALUE | string_to_r (VALUE self)
void | Init_Rational (void)

## Variables

VALUE | rb_cRational
static ID | id_abs
static ID | id_cmp
static ID | id_convert
static ID | id_eqeq_p
static ID | id_expt
static ID | id_fdiv
static ID | id_floor
static ID | id_idiv
static ID | id_inspect
static ID | id_integer_p
static ID | id_negate
static ID | id_to_f
static ID | id_to_i
static ID | id_to_s
static ID | id_truncate
static VALUE | rat_pat
static VALUE | an_e_pat
static VALUE | a_dot_pat
static VALUE | underscores_pat
static VALUE | an_underscore

## Macro Definition Documentation

#define binop | ( |  | n,
|  |  | op
| ) |  |

Value:
inline static VALUE \
f_##n(VALUE x, VALUE y)\
{\
return rb_funcall(x, (op), 1, y);\
}

Definition at line 32 of file rational.c.

#define DENOMINATOR DIGITS

Definition at line 1993 of file rational.c.

#define DIGITS "(?:[0-9](?:_[0-9]|[0-9])*)"

Definition at line 1991 of file rational.c.

#define f_boolcast | ( |  | x | ) | ((x) ? Qtrue : Qfalse)

Definition at line 30 of file rational.c.

Referenced by f_gt_p(), f_lt_p(), f_one_p(), f_zero_p(), fun1(), fun2(), and nurat_eqeq_p().

#define f_ceil | ( |  | x | ) | rb_funcall((x), id_ceil, 0)

Definition at line 1386 of file rational.c.

Referenced by nurat_rationalize_internal().

#define f_denominator | ( |  | x | ) | rb_funcall((x), id_denominator, 0)

Definition at line 1716 of file rational.c.

Referenced by nucomp_denominator(), nucomp_expt(), nucomp_numerator(), and numeric_denominator().

#define f_expt10 | ( |  | x | ) | f_expt(INT2FIX(10), x)

Referenced by f_round_common(), and string_to_r_internal().

#define f_gsub | ( |  | x,
|  |  | y,
|  |  | z
| ) |  | rb_funcall((x), id_gsub, 2, (y), (z))

Definition at line 2126 of file rational.c.

Referenced by string_to_r().

#define f_lshift | ( |  | x,
|  |  | n
| ) |  | rb_funcall((x), id_lshift, 1, (n))

Definition at line 1890 of file rational.c.

Referenced by float_rationalize(), and float_to_r().

#define f_match | ( |  | x,
|  |  | y
| ) |  | rb_funcall((x), id_match, 1, (y))

Definition at line 2024 of file rational.c.

Referenced by string_to_r_internal().

#define f_nonzero_p | ( |  | x | ) | (!f_zero_p(x))

Definition at line 201 of file rational.c.

Referenced by f_rational_new_bang2().

#define f_numerator | ( |  | x | ) | rb_funcall((x), id_numerator, 0)

Definition at line 1713 of file rational.c.

Referenced by nucomp_expt(), nucomp_numerator(), and numeric_numerator().

#define f_positive_p | ( |  | x | ) | (!f_negative_p(x))

Definition at line 181 of file rational.c.

Referenced by f_rational_new_bang2(), and float_rationalize().

#define f_quo | ( |  | x,
|  |  | y
| ) |  | rb_funcall((x), id_quo, 1, (y))

Definition at line 1389 of file rational.c.

#define f_reciprocal | ( |  | x | ) | f_quo(ONE, (x))

Definition at line 1391 of file rational.c.

Referenced by nurat_rationalize_internal().

#define f_split | ( |  | x,
|  |  | y
| ) |  | rb_funcall((x), id_split, 1, (y))

Definition at line 2027 of file rational.c.

Referenced by string_to_r_internal().

#define f_to_r | ( |  | x | ) | rb_funcall((x), id_to_r, 0)

Definition at line 2174 of file rational.c.

#define f_to_r | ( |  | x | ) | rb_funcall((x), id_to_r, 0)

Definition at line 2174 of file rational.c.

#define fun1 | ( |  | n | ) |

Value:
inline static VALUE \
f_##n(VALUE x)\
{\
return rb_funcall(x, id_##n, 0);\
}

Definition at line 39 of file rational.c.

#define fun2 | ( |  | n | ) |

Value:
inline static VALUE \
f_##n(VALUE x, VALUE y)\
{\
return rb_funcall(x, id_##n, 1, y);\
}

Definition at line 46 of file rational.c.

#define get_dat1 | ( |  | x | ) |

Value:
struct RRational *dat;\
dat = ((struct RRational *)(x))

Definition at line 339 of file rational.c.

Referenced by f_format(), nurat_add(), nurat_ceil(), nurat_cmp(), nurat_denominator(), nurat_div(), nurat_eqeq_p(), nurat_expt(), nurat_floor(), nurat_hash(), nurat_marshal_dump(), nurat_marshal_load(), nurat_mul(), nurat_numerator(), nurat_round(), nurat_sub(), nurat_to_f(), nurat_truncate(), and rb_rational_reciprocal().

#define get_dat2 | ( |  | x,
|  |  | y
| ) |  |

Value:
struct RRational *adat, *bdat;\
adat = ((struct RRational *)(x));\
bdat = ((struct RRational *)(y))

Definition at line 343 of file rational.c.

Referenced by nurat_add(), nurat_cmp(), nurat_div(), nurat_eqeq_p(), nurat_mul(), and nurat_sub().

#define id_ceil rb_intern("ceil")

Definition at line 1385 of file rational.c.

#define id_denominator rb_intern("denominator")

Definition at line 1715 of file rational.c.

#define id_gsub rb_intern("gsub")

Definition at line 2125 of file rational.c.

#define id_lshift rb_intern("<<")

Definition at line 1889 of file rational.c.

#define id_match rb_intern("match")

Definition at line 2023 of file rational.c.

#define id_numerator rb_intern("numerator")

Definition at line 1712 of file rational.c.

#define id_quo rb_intern("quo")

Definition at line 1388 of file rational.c.

#define id_split rb_intern("split")

Definition at line 2026 of file rational.c.

#define id_to_r rb_intern("to_r")

Definition at line 2173 of file rational.c.

#define id_to_r rb_intern("to_r")

Definition at line 2173 of file rational.c.

#define k_exact_one_p | ( |  | x | ) | (k_exact_p(x) && f_one_p(x))

Definition at line 257 of file rational.c.

Referenced by nurat_s_convert().

#define k_exact_p | ( |  | x | ) | (!k_float_p(x))

Definition at line 253 of file rational.c.

#define k_exact_zero_p | ( |  | x | ) | (k_exact_p(x) && f_zero_p(x))

Definition at line 256 of file rational.c.

Referenced by nurat_coerce(), nurat_expt(), and nurat_s_convert().

#define k_inexact_p | ( |  | x | ) | k_float_p(x)

Definition at line 254 of file rational.c.

#define NDEBUG

Definition at line 17 of file rational.c.

#define NUMERATOR "(?:" DIGITS "?\\.)?" DIGITS "(?:[eE][-+]?" DIGITS ")?"

Definition at line 1992 of file rational.c.

#define ONE INT2FIX(1)

Definition at line 21 of file rational.c.

Referenced by f_one_p(), f_rational_new1(), f_rational_new_bang1(), f_rational_new_no_reduce1(), f_round_common(), float_rationalize(), float_to_r(), nurat_add(), nurat_div(), nurat_expt(), nurat_mul(), nurat_rationalize_internal(), nurat_s_alloc(), nurat_s_new(), and nurat_sub().

#define PATTERN "\\A" WS "([-+])?(" NUMERATOR ")(?:\\/(" DENOMINATOR "))?" WS

Definition at line 1994 of file rational.c.

Referenced by make_patterns().

#define rb_intern | ( |  | str | ) | rb_intern_const(str)

#define rb_raise_zerodiv | ( |  | ) | rb_raise(rb_eZeroDivError, "divided by 0")

Definition at line 366 of file rational.c.

Referenced by nurat_div(), nurat_marshal_load(), nurat_s_canonicalize_internal(), and nurat_s_canonicalize_internal_no_reduce().

#define TWO INT2FIX(2)

Definition at line 22 of file rational.c.

Referenced by float_rationalize(), and nurat_round().

#define WS "\\s*"

Definition at line 1990 of file rational.c.

#define ZERO INT2FIX(0)

Definition at line 20 of file rational.c.

Referenced by binop(), f_imul(), f_lcm(), f_zero_p(), fun2(), nurat_cmp(), nurat_expt(), nurat_rationalize_internal(), nurat_s_alloc(), nurat_s_canonicalize_internal(), and nurat_s_canonicalize_internal_no_reduce().

## Function Documentation

binop | ( | mod | ,
|  | '%' |
| ) |  |

Definition at line 101 of file rational.c.

References FIX2LONG, FIXNUM_P, rb_funcall(), T_BIGNUM, TYPE, and ZERO.

static VALUE f_add | ( | VALUE | x,
|  | VALUE | y
| ) |  |

inline static

Definition at line 54 of file rational.c.

References FIX2LONG, FIXNUM_P, and rb_funcall().

Referenced by f_addsub(), float_rationalize(), nurat_add(), nurat_rationalize(), nurat_rationalize_internal(), nurat_round(), and string_to_r_internal().

static VALUE f_addsub | ( | VALUE | self,
|  | VALUE | anum,
|  | VALUE | aden,
|  | VALUE | bnum,
|  | VALUE | bden,
|  | int | k
| ) |  |

inline static

Definition at line 637 of file rational.c.

References CLASS_OF, f_add(), f_gcd(), f_idiv, f_imul(), f_mul, f_rational_new_no_reduce2(), f_sub(), FIX2LONG, FIXNUM_P, i_gcd(), and LONG2NUM.

Referenced by nurat_add(), and nurat_sub().

static VALUE f_cmp | ( | VALUE | x,
|  | VALUE | y
| ) |  |

inline static

Definition at line 64 of file rational.c.

References FIX2LONG, FIXNUM_P, id_cmp, INT2FIX, and rb_funcall().

Referenced by nurat_cmp(), nurat_expt(), nurat_s_canonicalize_internal(), and nurat_s_canonicalize_internal_no_reduce().

static VALUE f_div | ( | VALUE | x,
|  | VALUE | y
| ) |  |

inline static

Definition at line 78 of file rational.c.

References FIX2LONG, FIXNUM_P, and rb_funcall().

Referenced by f_lcm(), f_round_common(), nurat_fdiv(), nurat_s_convert(), and string_to_r_internal().

static VALUE f_format | ( | VALUE | self,
|  | VALUE(*)(VALUE) | func
| ) |  |

static

Definition at line 1537 of file rational.c.

References func, get_dat1, rb_str_cat2(), and rb_str_concat().

Referenced by nurat_inspect(), and nurat_to_s().

static VALUE f_gcd | ( | VALUE | x,
|  | VALUE | y
| ) |  |

inline static

Definition at line 285 of file rational.c.

References f_mod, f_negate, f_negative_p(), f_zero_p(), FIX2LONG, FIXNUM_P, i_gcd(), and LONG2NUM.

Referenced by f_addsub(), f_lcm(), f_muldiv(), nurat_s_canonicalize_internal(), rb_gcd(), and rb_gcdlcm().

static VALUE f_gt_p | ( | VALUE | x,
|  | VALUE | y
| ) |  |

inline static

Definition at line 86 of file rational.c.

References f_boolcast, FIX2LONG, FIXNUM_P, and rb_funcall().

static VALUE f_imul | ( | long | a,
|  | long | b
| ) |  |

inline static

Definition at line 605 of file rational.c.

References LONG2NUM, NUM2LONG(), rb_big_mul(), rb_int2big(), and ZERO.

Referenced by f_addsub(), f_muldiv(), and nurat_cmp().

static VALUE f_kind_of_p | ( | VALUE | x,
|  | VALUE | c
| ) |  |

inline static

Definition at line 224 of file rational.c.

References rb_obj_is_kind_of().

Referenced by k_float_p(), k_integer_p(), k_numeric_p(), and k_rational_p().

static VALUE f_lcm | ( | VALUE | x,
|  | VALUE | y
| ) |  |

inline static

Definition at line 332 of file rational.c.

References f_abs, f_div(), f_gcd(), f_mul, f_zero_p(), and ZERO.

Referenced by rb_gcdlcm(), and rb_lcm().

static VALUE f_lt_p | ( | VALUE | x,
|  | VALUE | y
| ) |  |

inline static

Definition at line 94 of file rational.c.

References f_boolcast, FIX2LONG, FIXNUM_P, and rb_funcall().

Referenced by f_round_common(), and nurat_rationalize_internal().

static VALUE f_muldiv | ( | VALUE | self,
|  | VALUE | anum,
|  | VALUE | aden,
|  | VALUE | bnum,
|  | VALUE | bden,
|  | int | k
| ) |  |

inline static

Definition at line 770 of file rational.c.

References CLASS_OF, f_gcd(), f_idiv, f_imul(), f_mul, f_negate, f_negative_p(), f_rational_new_no_reduce2(), FIX2LONG, FIXNUM_P, and i_gcd().

Referenced by nurat_div(), and nurat_mul().

static VALUE f_one_p | ( | VALUE | x | ) |

inline static

Definition at line 204 of file rational.c.

References f_boolcast, FIX2LONG, FIXNUM_P, id_eqeq_p, ONE, Qfalse, rb_funcall(), RRATIONAL, T_BIGNUM, T_FIXNUM, T_RATIONAL, and TYPE.

Referenced by nurat_div(), nurat_expt(), nurat_s_canonicalize_internal(), and nurat_s_canonicalize_internal_no_reduce().

static VALUE f_rational_new1 | ( | VALUE | klass,
|  | VALUE | x
| ) |  |

inline static

Definition at line 518 of file rational.c.

References assert, k_rational_p(), nurat_s_canonicalize_internal(), and ONE.

static VALUE f_rational_new2 | ( | VALUE | klass,
|  | VALUE | x,
|  | VALUE | y
| ) |  |

inline static

Definition at line 525 of file rational.c.

References assert, k_rational_p(), and nurat_s_canonicalize_internal().

Referenced by nurat_expt(), and nurat_rationalize().

static VALUE f_rational_new_bang1 | ( | VALUE | klass,
|  | VALUE | x
| ) |  |

inline static

Definition at line 403 of file rational.c.

References nurat_s_new_internal(), and ONE.

Referenced by f_round_common(), nurat_cmp(), nurat_coerce(), and nurat_expt().

static VALUE f_rational_new_bang2 | ( | VALUE | klass,
|  | VALUE | x,
|  | VALUE | y
| ) |  |

inline static

Definition at line 409 of file rational.c.

References assert, f_nonzero_p, f_positive_p, and nurat_s_new_internal().

static VALUE f_rational_new_no_reduce1 | ( | VALUE | klass,
|  | VALUE | x
| ) |  |

inline static

Definition at line 533 of file rational.c.

References assert, k_rational_p(), nurat_s_canonicalize_internal_no_reduce(), and ONE.

static VALUE f_rational_new_no_reduce2 | ( | VALUE | klass,
|  | VALUE | x,
|  | VALUE | y
| ) |  |

inline static

Definition at line 540 of file rational.c.

References assert, k_rational_p(), and nurat_s_canonicalize_internal_no_reduce().

Referenced by f_addsub(), f_muldiv(), nurat_div(), and rb_rational_reciprocal().

static VALUE f_round_common | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | self,
|  | VALUE(*)(VALUE) | func
| ) |  |

static

Definition at line 1218 of file rational.c.

References CLASS_OF, f_div(), f_expt10, f_lt_p(), f_mul, f_rational_new_bang1(), f_to_i, func, k_integer_p(), ONE, rb_eTypeError, rb_raise(), and rb_scan_args().

Referenced by nurat_ceil_n(), nurat_floor_n(), nurat_round_n(), and nurat_truncate_n().

static VALUE f_sub | ( | VALUE | x,
|  | VALUE | y
| ) |  |

inline static

Definition at line 128 of file rational.c.

References FIX2LONG, FIXNUM_P, and rb_funcall().

Referenced by f_addsub(), float_rationalize(), nurat_cmp(), nurat_rationalize(), nurat_rationalize_internal(), and nurat_sub().

static VALUE f_to_f | ( | VALUE | x | ) |

inline static

Definition at line 149 of file rational.c.

References DBL2NUM, id_to_f, rb_funcall(), rb_str_to_dbl(), T_STRING, and TYPE.

Referenced by nurat_add(), nurat_cmp(), nurat_coerce(), nurat_div(), nurat_eqeq_p(), nurat_expt(), nurat_fdiv(), nurat_mul(), and nurat_sub().

static VALUE f_zero_p | ( | VALUE | x | ) |

inline static

Definition at line 184 of file rational.c.

References f_boolcast, FIX2LONG, FIXNUM_P, id_eqeq_p, Qfalse, rb_funcall(), RRATIONAL, T_BIGNUM, T_FIXNUM, T_RATIONAL, TYPE, and ZERO.

Referenced by f_gcd(), f_lcm(), float_rationalize(), nurat_div(), nurat_eqeq_p(), nurat_fdiv(), and nurat_marshal_load().

static void float_decode_internal | ( | VALUE | self,
|  | VALUE * | rf,
|  | VALUE * | rn
| ) |  |

static

Definition at line 1866 of file rational.c.

References DBL_MANT_DIG, INT2FIX, rb_dbl2big(), and RFLOAT_VALUE.

Referenced by float_rationalize(), and float_to_r().

static VALUE float_denominator | ( | VALUE | self | ) |

static

Definition at line 1800 of file rational.c.

References INT2FIX, isinf(), isnan, rb_call_super(), and RFLOAT_VALUE.

Referenced by Init_Rational().

static VALUE float_numerator | ( | VALUE | self | ) |

static

Definition at line 1782 of file rational.c.

References isinf(), isnan, rb_call_super(), and RFLOAT_VALUE.

Referenced by Init_Rational().

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

static

Definition at line 1945 of file rational.c.

References f_abs, f_add(), f_eqeq_p(), f_expt, f_lshift, f_mul, f_negate, f_negative_p(), f_positive_p, f_sub(), f_to_r, f_zero_p(), float_decode_internal(), FLT_RADIX, INT2FIX, nurat_rationalize_internal(), ONE, p, rb_rational_new1, rb_rational_new2, rb_scan_args(), and TWO.

Referenced by Init_Rational().

static VALUE float_to_r | ( | VALUE | self | ) |

static

Definition at line 1909 of file rational.c.

References f_expt, f_lshift, f_mul, f_to_r, FIX2LONG, float_decode_internal(), FLT_RADIX, INT2FIX, ONE, and rb_rational_new2.

Referenced by Init_Rational().

fun1 | ( | abs |  | ) |

Definition at line 135 of file rational.c.

References id_to_i, rb_funcall(), rb_str_to_inum(), T_STRING, and TYPE.

fun1 | ( | to_s |  | ) |

Definition at line 156 of file rational.c.

References f_boolcast, FIX2LONG, FIXNUM_P, id_eqeq_p, and rb_funcall().

fun2 | ( | expt |  | ) |

Definition at line 167 of file rational.c.

References f_boolcast, FIX2LONG, FIXNUM_P, rb_funcall(), and ZERO.

static long i_gcd | ( | long | x,
|  | long | y
| ) |  |

inline static

Definition at line 264 of file rational.c.

Referenced by f_addsub(), f_gcd(), and f_muldiv().

void Init_Rational | ( | void |  | ) |

Definition at line 2292 of file rational.c.

References assert, CLASS_OF, float_denominator(), float_numerator(), float_rationalize(), float_to_r(), id_abs, id_cmp, id_convert, id_eqeq_p, id_expt, id_fdiv, id_floor, id_idiv, id_inspect, id_integer_p, id_negate, id_to_f, id_to_i, id_to_s, id_truncate, integer_denominator(), integer_numerator(), integer_rationalize(), integer_to_r(), make_patterns(), nilclass_rationalize(), nilclass_to_r(), numeric_denominator(), numeric_numerator(), nurat_add(), nurat_ceil_n(), nurat_cmp(), nurat_coerce(), nurat_denominator(), nurat_div(), nurat_eqeq_p(), nurat_expt(), nurat_f_rational(), nurat_fdiv(), nurat_floor_n(), nurat_hash(), nurat_inspect(), nurat_marshal_dump(), nurat_marshal_load(), nurat_mul(), nurat_numerator(), nurat_rationalize(), nurat_round_n(), nurat_s_alloc(), nurat_s_convert(), nurat_s_new(), nurat_sub(), nurat_to_f(), nurat_to_r(), nurat_to_s(), nurat_truncate(), nurat_truncate_n(), rb_cFloat, rb_cInteger, rb_cNilClass, rb_cNumeric, rb_cRational, rb_cString, rb_define_alloc_func(), rb_define_class(), rb_define_global_function(), rb_define_method(), rb_define_private_method(), rb_gcd(), rb_gcdlcm(), rb_intern, rb_lcm(), rb_undef_method(), and string_to_r().

static VALUE integer_denominator | ( | VALUE | self | ) |

static

Definition at line 1764 of file rational.c.

References INT2FIX.

Referenced by Init_Rational().

static VALUE integer_numerator | ( | VALUE | self | ) |

static

Definition at line 1752 of file rational.c.

Referenced by Init_Rational().

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

static

Definition at line 1859 of file rational.c.

References integer_to_r(), NULL, and rb_scan_args().

Referenced by Init_Rational().

static VALUE integer_to_r | ( | VALUE | self | ) |

static

Definition at line 1846 of file rational.c.

References rb_rational_new1.

Referenced by Init_Rational(), and integer_rationalize().

static VALUE k_float_p | ( | VALUE | x | ) |

inline static

Definition at line 242 of file rational.c.

References f_kind_of_p(), and rb_cFloat.

static VALUE k_integer_p | ( | VALUE | x | ) |

inline static

Definition at line 236 of file rational.c.

References f_kind_of_p(), and rb_cInteger.

Referenced by f_round_common(), nurat_int_value(), and nurat_s_convert().

static VALUE k_numeric_p | ( | VALUE | x | ) |

inline static

Definition at line 230 of file rational.c.

References f_kind_of_p(), and rb_cNumeric.

Referenced by nurat_expt(), nurat_int_check(), and nurat_s_convert().

static VALUE k_rational_p | ( | VALUE | x | ) |

inline static

Definition at line 248 of file rational.c.

References f_kind_of_p(), and rb_cRational.

Referenced by f_rational_new1(), f_rational_new2(), f_rational_new_no_reduce1(), f_rational_new_no_reduce2(), and nurat_expt().

static void make_patterns | ( | void |  | ) |

static

Definition at line 1997 of file rational.c.

References PATTERN, rb_gc_register_mark_object(), rb_reg_new(), and rb_usascii_str_new2().

Referenced by Init_Rational().

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

static

Definition at line 1828 of file rational.c.

References nilclass_to_r(), NULL, and rb_scan_args().

Referenced by Init_Rational().

static VALUE nilclass_to_r | ( | VALUE | self | ) |

static

Definition at line 1815 of file rational.c.

References INT2FIX, and rb_rational_new1.

Referenced by Init_Rational(), and nilclass_rationalize().

static VALUE numeric_denominator | ( | VALUE | self | ) |

static

Definition at line 1740 of file rational.c.

References f_denominator, and f_to_r.

Referenced by Init_Rational().

static VALUE numeric_numerator | ( | VALUE | self | ) |

static

Definition at line 1728 of file rational.c.

References f_numerator, and f_to_r.

Referenced by Init_Rational().

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

static

Definition at line 700 of file rational.c.

References f_add(), f_addsub(), f_to_f(), get_dat1, get_dat2, ONE, rb_num_coerce_bin(), T_BIGNUM, T_FIXNUM, T_FLOAT, T_RATIONAL, and TYPE.

Referenced by Init_Rational().

static VALUE nurat_ceil | ( | VALUE | self | ) |

static

Definition at line 1161 of file rational.c.

References f_idiv, f_negate, and get_dat1.

Referenced by nurat_ceil_n().

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

static

Definition at line 1290 of file rational.c.

References f_round_common(), and nurat_ceil().

Referenced by Init_Rational().

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

static

Definition at line 1008 of file rational.c.

References CLASS_OF, f_cmp(), f_imul(), f_mul, f_rational_new_bang1(), f_sub(), f_to_f(), FIX2LONG, FIXNUM_P, get_dat1, get_dat2, id_cmp, rb_num_coerce_cmp(), T_BIGNUM, T_FIXNUM, T_FLOAT, T_RATIONAL, TYPE, and ZERO.

Referenced by Init_Rational().

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

static

Definition at line 1097 of file rational.c.

References CLASS_OF, f_rational_new_bang1(), f_to_f(), INT2FIX, k_exact_zero_p, Qnil, rb_assoc_new(), rb_Complex(), rb_eTypeError, rb_obj_classname(), rb_raise(), RCOMPLEX, T_BIGNUM, T_COMPLEX, T_FIXNUM, T_FLOAT, T_RATIONAL, and TYPE.

Referenced by Init_Rational().

static VALUE nurat_denominator | ( | VALUE | self | ) |

static

Definition at line 594 of file rational.c.

References get_dat1.

Referenced by Init_Rational().

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

static

Definition at line 866 of file rational.c.

References CLASS_OF, DBL2NUM, f_mul, f_muldiv(), f_one_p(), f_rational_new_no_reduce2(), f_to_f(), f_zero_p(), get_dat1, get_dat2, INT2FIX, isinf(), isnan, NAN, ONE, rb_dbl2big(), rb_funcall(), rb_num_coerce_bin(), rb_raise_zerodiv, rb_rational_raw2, RFLOAT_VALUE, T_BIGNUM, T_FIXNUM, T_FLOAT, T_RATIONAL, and TYPE.

Referenced by Init_Rational().

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

static

Definition at line 1059 of file rational.c.

References f_boolcast, f_eqeq_p(), f_to_f(), f_zero_p(), FIX2LONG, FIXNUM_P, get_dat1, get_dat2, Qfalse, Qtrue, T_BIGNUM, T_FIXNUM, T_FLOAT, T_RATIONAL, and TYPE.

Referenced by Init_Rational().

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

static

Definition at line 947 of file rational.c.

References CLASS_OF, f_cmp(), f_expt, f_negate, f_one_p(), f_rational_new2(), f_rational_new_bang1(), f_to_f(), FIX2INT, get_dat1, id_expt, k_exact_zero_p, k_numeric_p(), k_rational_p(), ONE, rb_num_coerce_bin(), rb_warn(), T_BIGNUM, T_FIXNUM, T_FLOAT, T_RATIONAL, TYPE, and ZERO.

Referenced by Init_Rational().

static VALUE nurat_f_rational | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | klass
| ) |  |

static

Definition at line 554 of file rational.c.

References id_convert, rb_cRational, and rb_funcall2().

Referenced by Init_Rational().

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

static

Definition at line 924 of file rational.c.

References f_div(), f_to_f(), and f_zero_p().

Referenced by Init_Rational().

static VALUE nurat_floor | ( | VALUE | self | ) |

static

Definition at line 1154 of file rational.c.

References f_idiv, and get_dat1.

Referenced by nurat_floor_n().

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

static

Definition at line 1264 of file rational.c.

References f_round_common(), and nurat_floor().

Referenced by Init_Rational().

static VALUE nurat_hash | ( | VALUE | self | ) |

static

Definition at line 1522 of file rational.c.

References get_dat1, LONG2FIX, NUM2LONG(), rb_hash(), rb_memhash(), and v.

Referenced by Init_Rational().

static VALUE nurat_inspect | ( | VALUE | self | ) |

static

Definition at line 1580 of file rational.c.

References f_format(), f_inspect, rb_str_cat2(), rb_str_concat(), and rb_usascii_str_new2().

Referenced by Init_Rational().

static void nurat_int_check | ( | VALUE | num | ) |

inline static

Definition at line 431 of file rational.c.

References k_numeric_p(), rb_eTypeError, rb_raise(), T_BIGNUM, T_FIXNUM, and TYPE.

Referenced by nurat_int_value().

static VALUE nurat_int_value | ( | VALUE | num | ) |

inline static

Definition at line 444 of file rational.c.

References f_to_i, k_integer_p(), and nurat_int_check().

Referenced by nurat_s_new(), rb_gcd(), rb_gcdlcm(), and rb_lcm().

static VALUE nurat_marshal_dump | ( | VALUE | self | ) |

static

Definition at line 1593 of file rational.c.

References get_dat1, rb_assoc_new(), and rb_copy_generic_ivar().

Referenced by Init_Rational().

static VALUE nurat_marshal_load | ( | VALUE | self,
|  | VALUE | a
| ) |  |

static

Definition at line 1605 of file rational.c.

References Check_Type, f_zero_p(), get_dat1, RARRAY_LEN, RARRAY_PTR, rb_copy_generic_ivar(), rb_eArgError, rb_raise(), rb_raise_zerodiv, and T_ARRAY.

Referenced by Init_Rational().

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

static

Definition at line 823 of file rational.c.

References f_mul, f_muldiv(), f_to_f(), get_dat1, get_dat2, ONE, rb_num_coerce_bin(), T_BIGNUM, T_FIXNUM, T_FLOAT, T_RATIONAL, and TYPE.

Referenced by Init_Rational().

static VALUE nurat_numerator | ( | VALUE | self | ) |

static

Definition at line 573 of file rational.c.

References get_dat1.

Referenced by Init_Rational().

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

static

Definition at line 1498 of file rational.c.

References CLASS_OF, f_abs, f_add(), f_eqeq_p(), f_negate, f_negative_p(), f_rational_new2(), f_sub(), nurat_rationalize_internal(), p, and rb_scan_args().

Referenced by Init_Rational().

static void nurat_rationalize_internal | ( | VALUE | a,
|  | VALUE | b,
|  | VALUE * | p,
|  | VALUE * | q
| ) |  |

static

Definition at line 1453 of file rational.c.

References f_add(), f_ceil, f_lt_p(), f_mul, f_reciprocal, f_sub(), ONE, and ZERO.

Referenced by float_rationalize(), and nurat_rationalize().

static VALUE nurat_round | ( | VALUE | self | ) |

static

Definition at line 1194 of file rational.c.

References f_add(), f_idiv, f_mul, f_negate, f_negative_p(), get_dat1, neg, and TWO.

Referenced by nurat_round_n().

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

static

Definition at line 1343 of file rational.c.

References f_round_common(), and nurat_round().

Referenced by Init_Rational().

static VALUE nurat_s_alloc | ( | VALUE | klass | ) |

static

Definition at line 361 of file rational.c.

References nurat_s_new_internal(), ONE, and ZERO.

Referenced by Init_Rational().

static VALUE nurat_s_canonicalize_internal | ( | VALUE | klass,
|  | VALUE | num,
|  | VALUE | den
| ) |  |

inline static

Definition at line 453 of file rational.c.

References f_cmp(), f_gcd(), f_idiv, f_negate, f_one_p(), FIX2INT, nurat_s_new_internal(), rb_raise_zerodiv, and ZERO.

Referenced by f_rational_new1(), f_rational_new2(), nurat_s_new(), and rb_rational_new().

static VALUE nurat_s_canonicalize_internal_no_reduce | ( | VALUE | klass,
|  | VALUE | num,
|  | VALUE | den
| ) |  |

inline static

Definition at line 479 of file rational.c.

References f_cmp(), f_negate, f_one_p(), FIX2INT, nurat_s_new_internal(), rb_raise_zerodiv, and ZERO.

Referenced by f_rational_new_no_reduce1(), and f_rational_new_no_reduce2().

static VALUE nurat_s_convert | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | klass
| ) |  |

static

Definition at line 2177 of file rational.c.

References f_div(), f_to_r, k_exact_one_p, k_exact_zero_p, k_integer_p(), k_numeric_p(), NIL_P, nurat_s_new(), rb_backref_get(), rb_backref_set(), rb_convert_type(), rb_eTypeError, rb_match_busy(), rb_raise(), rb_scan_args(), RCOMPLEX, string_to_r_strict(), T_BIGNUM, T_COMPLEX, T_FIXNUM, T_FLOAT, T_RATIONAL, T_STRING, and TYPE.

Referenced by Init_Rational(), and rb_Rational().

static VALUE nurat_s_new | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | klass
| ) |  |

static

Definition at line 499 of file rational.c.

References nurat_int_value(), nurat_s_canonicalize_internal(), ONE, and rb_scan_args().

Referenced by Init_Rational(), and nurat_s_convert().

static VALUE nurat_s_new_internal | ( | VALUE | klass,
|  | VALUE | num,
|  | VALUE | den
| ) |  |

inline static

Definition at line 349 of file rational.c.

References NEWOBJ, OBJSETUP, and T_RATIONAL.

Referenced by f_rational_new_bang1(), f_rational_new_bang2(), nurat_s_alloc(), nurat_s_canonicalize_internal(), nurat_s_canonicalize_internal_no_reduce(), and rb_rational_raw().

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

static

Definition at line 742 of file rational.c.

References f_addsub(), f_sub(), f_to_f(), get_dat1, get_dat2, ONE, rb_num_coerce_bin(), T_BIGNUM, T_FIXNUM, T_FLOAT, T_RATIONAL, and TYPE.

Referenced by Init_Rational().

static VALUE nurat_to_f | ( | VALUE | self | ) |

static

Definition at line 1362 of file rational.c.

References get_dat1.

Referenced by Init_Rational().

static VALUE nurat_to_r | ( | VALUE | self | ) |

static

Definition at line 1380 of file rational.c.

Referenced by Init_Rational().

static VALUE nurat_to_s | ( | VALUE | self | ) |

static

Definition at line 1562 of file rational.c.

References f_format(), and f_to_s.

Referenced by Init_Rational().

static VALUE nurat_truncate | ( | VALUE | self | ) |

static

Definition at line 1185 of file rational.c.

References f_idiv, f_negate, f_negative_p(), and get_dat1.

Referenced by Init_Rational(), and nurat_truncate_n().

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

static

Definition at line 1316 of file rational.c.

References f_round_common(), and nurat_truncate().

Referenced by Init_Rational().

VALUE rb_gcd | ( | VALUE | self,
|  | VALUE | other
| ) |  |

Definition at line 1644 of file rational.c.

References f_gcd(), and nurat_int_value().

Referenced by Init_Rational().

VALUE rb_gcdlcm | ( | VALUE | self,
|  | VALUE | other
| ) |  |

Definition at line 1683 of file rational.c.

References f_gcd(), f_lcm(), nurat_int_value(), and rb_assoc_new().

Referenced by Init_Rational().

VALUE rb_lcm | ( | VALUE | self,
|  | VALUE | other
| ) |  |

Definition at line 1664 of file rational.c.

References f_lcm(), and nurat_int_value().

Referenced by Init_Rational(), and nucomp_denominator().

VALUE rb_Rational | ( | VALUE | x,
|  | VALUE | y
| ) |  |

Definition at line 1704 of file rational.c.

References nurat_s_convert(), and rb_cRational.

Referenced by BigDecimal_to_r().

VALUE rb_rational_new | ( | VALUE | x,
|  | VALUE | y
| ) |  |

Definition at line 1696 of file rational.c.

References nurat_s_canonicalize_internal(), and rb_cRational.

VALUE rb_rational_raw | ( | VALUE | x,
|  | VALUE | y
| ) |  |

Definition at line 1690 of file rational.c.

References nurat_s_new_internal(), and rb_cRational.

VALUE rb_rational_reciprocal | ( | VALUE | x | ) |

Definition at line 1624 of file rational.c.

References CLASS_OF, f_rational_new_no_reduce2(), and get_dat1.

Referenced by fix_divide().

static VALUE string_to_r | ( | VALUE | self | ) |

static

Definition at line 2152 of file rational.c.

References f_gsub, INT2FIX, NIL_P, RARRAY_PTR, rb_backref_get(), rb_backref_set(), rb_eFloatDomainError, rb_match_busy(), rb_raise(), rb_rational_new1, string_to_r_internal(), T_FLOAT, and TYPE.

Referenced by Init_Rational().

static VALUE string_to_r_internal | ( | VALUE | self | ) |

static

Definition at line 2032 of file rational.c.

References count, f_add(), f_div(), f_expt10, f_match, f_mul, f_negate, f_split, f_to_i, LONG2NUM, NIL_P, p, Qnil, RARRAY_LEN, RARRAY_PTR, rb_assoc_new(), rb_isdigit(), rb_rational_new1, rb_reg_match_post(), rb_reg_nth_match(), rb_usascii_str_new2(), RSTRING_LEN, RSTRING_PTR, strchr(), and v.

Referenced by string_to_r(), and string_to_r_strict().

static VALUE string_to_r_strict | ( | VALUE | self | ) |

static

Definition at line 2114 of file rational.c.

References f_inspect, NIL_P, RARRAY_PTR, rb_eArgError, rb_raise(), RSTRING_LEN, string_to_r_internal(), and StringValuePtr.

Referenced by nurat_s_convert().

## Variable Documentation

VALUE a_dot_pat

static

Definition at line 1988 of file rational.c.

VALUE an_e_pat

static

Definition at line 1988 of file rational.c.

VALUE an_underscore

static

Definition at line 1988 of file rational.c.

ID id_abs

static

Definition at line 26 of file rational.c.

Referenced by Init_Rational().

ID id_cmp

static

Definition at line 26 of file rational.c.

Referenced by f_cmp(), Init_Rational(), and nurat_cmp().

ID id_convert

static

Definition at line 26 of file rational.c.

Referenced by Init_Rational(), and nurat_f_rational().

ID id_eqeq_p

static

Definition at line 26 of file rational.c.

Referenced by f_one_p(), f_zero_p(), fun1(), and Init_Rational().

ID id_expt

static

Definition at line 26 of file rational.c.

Referenced by Init_Rational(), and nurat_expt().

ID id_fdiv

static

Definition at line 26 of file rational.c.

Referenced by Init_Rational().

ID id_floor

static

Definition at line 26 of file rational.c.

Referenced by Init_Rational().

ID id_idiv

static

Definition at line 26 of file rational.c.

Referenced by Init_Rational().

ID id_inspect

static

Definition at line 26 of file rational.c.

Referenced by Init_Rational().

ID id_integer_p

static

Definition at line 26 of file rational.c.

Referenced by Init_Rational().

ID id_negate

static

Definition at line 26 of file rational.c.

Referenced by Init_Rational().

ID id_to_f

static

Definition at line 26 of file rational.c.

Referenced by f_to_f(), and Init_Rational().

ID id_to_i

static

Definition at line 26 of file rational.c.

Referenced by fun1(), and Init_Rational().

ID id_to_s

static

Definition at line 26 of file rational.c.

Referenced by Init_Rational().

ID id_truncate

static

Definition at line 26 of file rational.c.

Referenced by Init_Rational().

VALUE rat_pat

static

Definition at line 1988 of file rational.c.

VALUE rb_cRational

Definition at line 24 of file rational.c.

VALUE underscores_pat

static

Definition at line 1988 of file rational.c.