Ruby
2.4.2p198(2017-09-14revision59899)
|
#include "ruby/config.h"
#include <math.h>
#include "internal.h"
#include "ruby_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 | RFLOAT_0 DBL2NUM(0) |
#define | f_boolcast(x) ((x) ? Qtrue : Qfalse) |
#define | binop(n, op) |
#define | fun1(n) |
#define | fun2(n) |
#define | math1(n) |
#define | math2(n) |
#define | PRESERVE_SIGNEDZERO |
#define | f_positive_p(x) (!f_negative_p(x)) |
#define | f_nonzero_p(x) (!f_zero_p(x)) |
#define | k_exact_p(x) (!RB_FLOAT_TYPE_P(x)) |
#define | k_exact_zero_p(x) (k_exact_p(x) && f_zero_p(x)) |
#define | get_dat1(x) struct RComplex *dat = RCOMPLEX(x) |
#define | get_dat2(x, y) struct RComplex *adat = RCOMPLEX(x), *bdat = RCOMPLEX(y) |
#define | canonicalization 0 |
#define | imp1(n) |
#define | nucomp_mul rb_complex_mul |
#define | rb_raise_zerodiv() rb_raise(rb_eZeroDivError, "divided by 0") |
#define | nucomp_quo nucomp_div |
#define | FINITE_TYPE_P(v) (RB_INTEGER_TYPE_P(v) || RB_TYPE_P(v, T_RATIONAL)) |
#define | rb_intern(str) rb_intern_const(str) |
Variables | |
VALUE | rb_cComplex |
static ID | id_abs |
static ID | id_arg |
static ID | id_denominator |
static ID | id_expt |
static ID | id_fdiv |
static ID | id_negate |
static ID | id_numerator |
static ID | id_quo |
static ID | id_real_p |
static ID | id_to_f |
static ID | id_to_i |
static ID | id_to_r |
static ID | id_i_real |
static ID | id_i_imag |
static ID | id_finite_p |
static ID | id_infinite_p |
static ID | id_rationalize |
static ID | id_PI |
#define binop | ( | n, | |
op | |||
) |
#define canonicalization 0 |
Definition at line 331 of file complex.c.
Referenced by f_complex_new_bang2(), and f_rational_new_bang1().
Definition at line 41 of file complex.c.
Referenced by nucomp_eqeq_p(), nucomp_eql_p(), and nucomp_false().
#define f_positive_p | ( | x | ) | (!f_negative_p(x)) |
Definition at line 223 of file complex.c.
Referenced by m_sin(), and numeric_arg().
#define FINITE_TYPE_P | ( | v | ) | (RB_INTEGER_TYPE_P(v) || RB_TYPE_P(v, T_RATIONAL)) |
Definition at line 1317 of file complex.c.
Referenced by rb_complex_finite_p(), and rb_complex_infinite_p().
#define fun1 | ( | n | ) |
#define fun2 | ( | n | ) |
Definition at line 256 of file complex.c.
Referenced by f_divide(), f_format(), imp1(), m_sin(), nucomp_abs(), nucomp_abs2(), nucomp_arg(), nucomp_conj(), nucomp_denominator(), nucomp_eqeq_p(), nucomp_expt(), nucomp_false(), nucomp_hash(), nucomp_imag(), nucomp_loader(), nucomp_marshal_dump(), nucomp_negate(), nucomp_numerator(), nucomp_rationalize(), nucomp_real(), nucomp_rect(), nucomp_s_canonicalize_internal(), nucomp_s_convert(), nucomp_sub(), nucomp_to_f(), nucomp_to_i(), nucomp_to_r(), rb_complex_mul(), and rb_complex_plus().
Definition at line 259 of file complex.c.
Referenced by f_divide(), nucomp_eqeq_p(), nucomp_eql_p(), nucomp_s_canonicalize_internal(), nucomp_sub(), rb_complex_mul(), and rb_complex_plus().
#define imp1 | ( | n | ) |
#define k_exact_p | ( | x | ) | (!RB_FLOAT_TYPE_P(x)) |
Definition at line 252 of file complex.c.
Referenced by nucomp_false().
Definition at line 254 of file complex.c.
Referenced by nucomp_expt(), nucomp_rationalize(), nucomp_s_canonicalize_internal(), nucomp_s_convert(), nucomp_to_f(), nucomp_to_i(), and nucomp_to_r().
#define math1 | ( | n | ) |
#define math2 | ( | n | ) |
#define nucomp_mul rb_complex_mul |
Definition at line 783 of file complex.c.
Referenced by Init_Complex().
#define nucomp_quo nucomp_div |
Definition at line 858 of file complex.c.
Referenced by Init_Complex().
#define ONE INT2FIX(1) |
Definition at line 20 of file complex.c.
Referenced by f_divide(), f_reciprocal(), Init_Complex(), nucomp_expt(), and nucomp_s_convert().
#define rb_intern | ( | str | ) | rb_intern_const(str) |
Referenced by Init_Complex().
#define rb_raise_zerodiv | ( | ) | rb_raise(rb_eZeroDivError, "divided by 0") |
#define RFLOAT_0 DBL2NUM(0) |
Definition at line 22 of file complex.c.
Referenced by f_complex_polar().
#define TWO INT2FIX(2) |
Definition at line 21 of file complex.c.
Referenced by m_sin(), and nucomp_expt().
#define ZERO INT2FIX(0) |
Definition at line 19 of file complex.c.
Referenced by f_complex_new_bang1(), f_mul(), f_zero_p(), Init_Complex(), m_sin(), nucomp_expt(), nucomp_s_alloc(), nucomp_s_canonicalize_internal(), nucomp_s_convert(), nucomp_s_new(), nucomp_s_polar(), and read_comp().
Definition at line 81 of file complex.c.
References FIXNUM_P, FIXNUM_ZERO_P, and rb_funcall().
Referenced by f_divide(), m_sin(), nucomp_abs2(), nucomp_expt(), nucomp_s_canonicalize_internal(), nucomp_s_convert(), rb_complex_mul(), and rb_complex_plus().
Definition at line 412 of file complex.c.
References assert, nucomp_s_canonicalize_internal(), nucomp_s_convert(), RB_TYPE_P, and T_COMPLEX.
Referenced by f_divide(), imp1(), m_sin(), nucomp_conj(), nucomp_negate(), nucomp_numerator(), nucomp_sub(), rb_complex_mul(), and rb_complex_plus().
Definition at line 304 of file complex.c.
References assert, nucomp_s_new_internal(), RB_TYPE_P, T_COMPLEX, and ZERO.
Referenced by nucomp_coerce(), and nucomp_expt().
Definition at line 311 of file complex.c.
References assert, canonicalization, f, nucomp_canonicalization(), nucomp_s_new_internal(), RB_TYPE_P, RUBY_FUNC_EXPORTED, and T_COMPLEX.
Referenced by Init_Complex(), and nucomp_s_convert().
Definition at line 540 of file complex.c.
References assert, DBL2NUM, f_mul(), f_negate, f_zero_p(), M_PI, M_PI_2, m_sin(), nucomp_s_canonicalize_internal(), nucomp_s_new_internal(), RB_FLOAT_TYPE_P, RB_TYPE_P, RFLOAT_0, RFLOAT_VALUE, and T_COMPLEX.
Referenced by nucomp_expt(), nucomp_s_polar(), and rb_complex_polar().
Definition at line 93 of file complex.c.
References FIX2LONG, FIXNUM_P, and rb_funcall().
Referenced by m_sin(), and nucomp_numerator().
Definition at line 786 of file complex.c.
References CLASS_OF, f_abs, f_add(), f_complex_new2(), f_gt_p(), f_mul(), f_negate, f_sub(), func, get_dat1, get_dat2, k_numeric_p(), ONE, RB_FLOAT_TYPE_P, rb_num_coerce_bin(), RB_TYPE_P, and T_COMPLEX.
Referenced by nucomp_div(), and nucomp_fdiv().
Definition at line 1255 of file complex.c.
References f_abs, f_tpositive_p(), func, get_dat1, rb_isdigit(), rb_str_cat2(), rb_str_concat(), RSTRING_LEN, and RSTRING_PTR.
Referenced by nucomp_inspect(), and nucomp_to_s().
Definition at line 101 of file complex.c.
References cmp(), FIXNUM_P, rb_cmpint(), rb_float_gt(), RB_FLOAT_TYPE_P, rb_funcall(), rb_int_gt(), RB_INTEGER_TYPE_P, rb_rational_cmp(), RB_TYPE_P, RTEST, SIGNED_VALUE, and T_RATIONAL.
Referenced by f_divide(), and nucomp_expt().
Definition at line 241 of file complex.c.
References rb_obj_is_kind_of().
Referenced by k_numeric_p().
Definition at line 118 of file complex.c.
References FIX2LONG, FIXNUM_P, rb_funcall(), RB_INTEGER_TYPE_P, and ZERO.
Referenced by f_complex_polar(), f_divide(), imp1(), m_sin(), nucomp_abs2(), nucomp_expt(), nucomp_numerator(), nucomp_s_convert(), numeric_abs2(), rb_complex_mul(), and safe_mul().
|
inlinestatic |
Definition at line 1239 of file complex.c.
References f_negative_p(), isnan, RB_FLOAT_TYPE_P, RFLOAT_VALUE, and signbit().
Referenced by f_tpositive_p().
Definition at line 144 of file complex.c.
References FIXNUM_P, FIXNUM_ZERO_P, and rb_funcall().
Referenced by f_divide(), m_sin(), nucomp_expt(), nucomp_s_canonicalize_internal(), nucomp_sub(), and rb_complex_mul().
Definition at line 188 of file complex.c.
References DBL2NUM, id_to_f, rb_funcall(), rb_str_to_dbl(), RB_TYPE_P, and T_STRING.
Referenced by nucomp_abs(), and nucomp_to_f().
|
inlinestatic |
Definition at line 1249 of file complex.c.
References f_signbit().
Referenced by f_format(), and float_arg().
|
inlinestatic |
Definition at line 226 of file complex.c.
References FIXNUM_ZERO_P, rb_equal(), RB_INTEGER_TYPE_P, RB_TYPE_P, RRATIONAL, T_RATIONAL, and ZERO.
Referenced by f_complex_polar(), f_gcd(), nucomp_abs(), nucomp_eqeq_p(), nucomp_s_canonicalize_internal(), nurat_div(), nurat_fdiv(), and rb_complex_mul().
Definition at line 2141 of file complex.c.
References f_tpositive_p(), id_PI, INT2FIX, isnan, rb_const_get(), rb_mMath, and RFLOAT_VALUE.
Referenced by numeric_polar(), and numeric_rect().
fun1 | ( | numerator | ) |
Definition at line 177 of file complex.c.
References id_to_i, rb_funcall(), rb_str_to_inum(), RB_TYPE_P, and T_STRING.
fun1 | ( | to_r | ) |
Definition at line 195 of file complex.c.
References FIXNUM_P, NUM2DBL, rb_equal(), and RB_FLOAT_TYPE_P.
fun2 | ( | expt | ) |
Definition at line 207 of file complex.c.
References INT_NEGATIVE_P, RB_FLOAT_TYPE_P, RB_INTEGER_TYPE_P, rb_num_negative_p(), RB_TYPE_P, RFLOAT_VALUE, RRATIONAL, and T_RATIONAL.
imp1 | ( | cos | ) |
Definition at line 466 of file complex.c.
References rb_math_log().
imp1 | ( | sin | ) |
Definition at line 476 of file complex.c.
References f_complex_new2(), f_mul(), f_negate, get_dat1, and rb_cComplex.
void Init_Complex | ( | void | ) |
Definition at line 2184 of file complex.c.
References assert, CLASS_OF, f_complex_new_bang2(), id_abs, id_arg, id_denominator, id_expt, id_fdiv, id_finite_p, id_i_imag, id_i_real, id_infinite_p, id_negate, id_numerator, id_PI, id_quo, id_rationalize, id_real_p, id_to_f, id_to_i, id_to_r, nilclass_to_c(), nucomp_abs(), nucomp_abs2(), nucomp_arg(), nucomp_coerce(), nucomp_conj(), nucomp_denominator(), nucomp_div(), nucomp_dumper(), nucomp_eqeq_p(), nucomp_eql_p(), nucomp_expt(), nucomp_f_complex(), nucomp_false(), nucomp_fdiv(), nucomp_hash(), nucomp_imag(), nucomp_inspect(), nucomp_loader(), nucomp_marshal_dump(), nucomp_marshal_load(), nucomp_mul, nucomp_negate(), nucomp_numerator(), nucomp_polar(), nucomp_quo, nucomp_rationalize(), nucomp_real(), nucomp_rect(), nucomp_s_alloc(), nucomp_s_new(), nucomp_s_polar(), nucomp_sub(), nucomp_to_c(), nucomp_to_f(), nucomp_to_i(), nucomp_to_r(), nucomp_to_s(), numeric_abs2(), numeric_arg(), numeric_conj(), numeric_imag(), numeric_polar(), numeric_real(), numeric_rect(), numeric_to_c(), ONE, rb_cComplex, rb_cFloat, rb_cNilClass, rb_cNumeric, rb_cObject, rb_complex_finite_p(), rb_complex_infinite_p(), rb_complex_plus(), rb_cString, rb_define_alloc_func(), rb_define_class(), rb_define_class_under(), rb_define_const(), rb_define_global_function(), rb_define_method(), rb_define_private_method(), rb_define_singleton_method(), rb_intern, rb_marshal_define_compat(), rb_mComparable, rb_provide(), rb_undef_method(), rb_undef_methods_from(), string_to_c(), and ZERO.
|
inlinestatic |
Definition at line 1629 of file complex.c.
Referenced by read_comp(), and read_digits().
|
inlinestatic |
Definition at line 1741 of file complex.c.
Referenced by read_comp().
|
inlinestatic |
Definition at line 1666 of file complex.c.
Referenced by read_num().
|
inlinestatic |
Definition at line 1609 of file complex.c.
Referenced by read_comp(), and read_sign().
|
inlinestatic |
Definition at line 247 of file complex.c.
References f_kind_of_p(), and rb_cNumeric.
Referenced by f_divide(), nucomp_coerce(), nucomp_eqeq_p(), nucomp_expt(), nucomp_real_check(), nucomp_s_alloc(), nucomp_s_convert(), nucomp_sub(), rb_complex_mul(), and rb_complex_plus().
Definition at line 495 of file complex.c.
References f_abs, f_add(), f_complex_new2(), f_div(), f_mul(), f_negate, f_positive_p, f_sub(), get_dat1, imp1, rb_cComplex, rb_complex_sqrt(), TWO, and ZERO.
Referenced by f_complex_polar().
Definition at line 1589 of file complex.c.
References INT2FIX, and rb_complex_new1.
Referenced by Init_Complex().
Definition at line 1022 of file complex.c.
References f_abs, f_to_f(), f_zero_p(), get_dat1, RB_FLOAT_TYPE_P, and rb_math_hypot().
Referenced by Init_Complex(), rb_complex_abs(), rb_complex_finite_p(), and rb_complex_infinite_p().
Definition at line 1069 of file complex.c.
References get_dat1, and rb_math_atan2().
Referenced by Init_Complex().
Definition at line 999 of file complex.c.
References CLASS_OF, f_complex_new_bang1(), k_numeric_p(), PRIsVALUE, Qnil, rb_assoc_new(), rb_eTypeError, rb_obj_class(), rb_raise(), RB_TYPE_P, and T_COMPLEX.
Referenced by Init_Complex().
Definition at line 1115 of file complex.c.
References CLASS_OF, f_complex_new2(), f_negate, get_dat1, and Qtrue.
Referenced by Init_Complex().
Definition at line 1168 of file complex.c.
References f_denominator, get_dat1, and rb_lcm().
Referenced by Init_Complex().
Definition at line 853 of file complex.c.
References f_divide(), f_quo, and id_quo.
Referenced by Init_Complex().
Definition at line 1379 of file complex.c.
Referenced by Init_Complex().
Definition at line 981 of file complex.c.
References f_boolcast, f_eqeq_p(), f_zero_p(), get_dat1, get_dat2, k_numeric_p(), RB_TYPE_P, and T_COMPLEX.
Referenced by Init_Complex().
Definition at line 1225 of file complex.c.
References CLASS_OF, f_boolcast, f_eqeq_p(), get_dat2, Qfalse, RB_TYPE_P, and T_COMPLEX.
Referenced by Init_Complex().
Definition at line 890 of file complex.c.
References CLASS_OF, f_abs, f_add(), f_complex_new_bang1(), f_complex_polar(), f_expt, f_gt_p(), f_mul(), f_reciprocal(), f_sub(), FIX2LONG, FIXNUM_P, get_dat1, id_expt, k_exact_zero_p, k_numeric_p(), LONG2FIX, nucomp_s_new_internal(), ONE, rb_int_uminus(), rb_num_coerce_bin(), RB_TYPE_P, rb_warn(), RRATIONAL, T_BIGNUM, T_COMPLEX, T_RATIONAL, TWO, and ZERO.
Referenced by Init_Complex().
Definition at line 454 of file complex.c.
References nucomp_s_convert(), and rb_cComplex.
Referenced by Init_Complex().
Definition at line 1137 of file complex.c.
References f_boolcast, get_dat1, k_exact_p, and Qfalse.
Referenced by Init_Complex().
Definition at line 869 of file complex.c.
References f_divide(), and id_fdiv.
Referenced by Init_Complex().
Definition at line 1209 of file complex.c.
References get_dat1, LONG2FIX, NUM2LONG, rb_hash(), and rb_memhash().
Referenced by Init_Complex().
Definition at line 1306 of file complex.c.
References f_format(), rb_inspect(), rb_str_cat2(), rb_str_concat(), and rb_usascii_str_new2.
Referenced by Init_Complex().
Definition at line 1386 of file complex.c.
References get_dat1, id_i_imag, id_i_real, rb_ivar_get(), RCOMPLEX_SET_IMAG, and RCOMPLEX_SET_REAL.
Referenced by Init_Complex().
Definition at line 1398 of file complex.c.
References get_dat1, rb_assoc_new(), and rb_copy_generic_ivar().
Referenced by Init_Complex().
Definition at line 1410 of file complex.c.
References Check_Type, id_i_imag, id_i_real, RARRAY_AREF, RARRAY_LEN, rb_eArgError, rb_ivar_set(), rb_raise(), and T_ARRAY.
Referenced by Init_Complex().
Definition at line 653 of file complex.c.
References CLASS_OF, f_complex_new2(), f_negate, and get_dat1.
Referenced by Init_Complex().
Definition at line 1193 of file complex.c.
References CLASS_OF, f_complex_new2(), f_denominator, f_div(), f_mul(), f_numerator, and get_dat1.
Referenced by Init_Complex().
Definition at line 1100 of file complex.c.
References f_abs, and rb_assoc_new().
Referenced by Init_Complex().
Definition at line 1554 of file complex.c.
References get_dat1, id_rationalize, k_exact_zero_p, NULL, PRIsVALUE, rb_eRangeError, rb_funcallv, rb_raise(), and rb_scan_args().
Referenced by Init_Complex().
|
inlinestatic |
Definition at line 335 of file complex.c.
References k_numeric_p(), rb_eTypeError, RB_FLOAT_TYPE_P, RB_INTEGER_TYPE_P, rb_raise(), RB_TYPE_P, and T_RATIONAL.
Referenced by nucomp_s_new(), and nucomp_s_polar().
Definition at line 1085 of file complex.c.
References get_dat1, and rb_assoc_new().
Referenced by Init_Complex().
Definition at line 274 of file complex.c.
References argc, argv, f_to_i, k_numeric_p(), nucomp_s_new_internal(), rb_scan_args(), and ZERO.
Referenced by Init_Complex().
Definition at line 346 of file complex.c.
References f_add(), f_sub(), f_zero_p(), get_dat1, get_dat2, k_exact_zero_p, nucomp_s_new_internal(), and ZERO.
Referenced by f_complex_new2(), f_complex_polar(), nucomp_s_new(), and rb_complex_new().
Definition at line 1951 of file complex.c.
References f_add(), f_complex_new_bang2(), f_mul(), get_dat1, k_exact_zero_p, k_numeric_p(), NIL_P, nucomp_s_new(), ONE, rb_backref_get(), rb_backref_set(), rb_cComplex, rb_convert_type(), rb_eTypeError, rb_match_busy(), rb_raise(), rb_scan_args(), RB_TYPE_P, string_to_c_strict(), T_COMPLEX, T_STRING, and ZERO.
Referenced by f_complex_new2(), nucomp_f_complex(), and rb_Complex().
Definition at line 393 of file complex.c.
References nucomp_real_check(), nucomp_s_canonicalize_internal(), rb_scan_args(), and ZERO.
Referenced by Init_Complex(), and nucomp_s_convert().
Definition at line 263 of file complex.c.
References FL_WB_PROTECTED, NEWOBJ_OF, RCOMPLEX_SET_IMAG, RCOMPLEX_SET_REAL, RGENGC_WB_PROTECTED_COMPLEX, and T_COMPLEX.
Referenced by f_complex_new_bang1(), f_complex_new_bang2(), f_complex_polar(), nucomp_expt(), nucomp_s_alloc(), nucomp_s_canonicalize_internal(), nucomp_s_polar(), and rb_complex_raw().
Definition at line 594 of file complex.c.
References f_complex_polar(), nucomp_real_check(), nucomp_s_new_internal(), rb_scan_args(), and ZERO.
Referenced by Init_Complex().
Definition at line 707 of file complex.c.
References CLASS_OF, f_complex_new2(), f_sub(), get_dat1, get_dat2, k_numeric_p(), rb_num_coerce_bin(), RB_TYPE_P, and T_COMPLEX.
Referenced by Init_Complex().
Definition at line 1577 of file complex.c.
Referenced by Init_Complex().
Definition at line 1504 of file complex.c.
References f_to_f(), get_dat1, k_exact_zero_p, PRIsVALUE, rb_eRangeError, and rb_raise().
Referenced by Init_Complex().
Definition at line 1481 of file complex.c.
References f_to_i, get_dat1, k_exact_zero_p, PRIsVALUE, rb_eRangeError, and rb_raise().
Referenced by Init_Complex().
Definition at line 1529 of file complex.c.
References f_to_r, get_dat1, k_exact_zero_p, PRIsVALUE, rb_eRangeError, and rb_raise().
Referenced by Init_Complex().
Definition at line 1288 of file complex.c.
References f_format(), and rb_String().
Referenced by Init_Complex().
Definition at line 2067 of file complex.c.
References DBL2NUM, f_positive_p, INT2FIX, and M_PI.
Referenced by Init_Complex(), and numeric_polar().
Definition at line 2127 of file complex.c.
Referenced by Init_Complex().
Definition at line 2096 of file complex.c.
References f_abs, float_arg(), numeric_arg(), rb_assoc_new(), rb_float_abs(), RB_FLOAT_TYPE_P, rb_int_abs(), RB_INTEGER_TYPE_P, rb_rational_abs(), RB_TYPE_P, and T_RATIONAL.
Referenced by Init_Complex().
Definition at line 2028 of file complex.c.
Referenced by Init_Complex().
Definition at line 2082 of file complex.c.
References float_arg(), INT2FIX, and rb_assoc_new().
Referenced by Init_Complex().
Definition at line 1601 of file complex.c.
References rb_complex_new1.
Referenced by Init_Complex().
Definition at line 1847 of file complex.c.
References ALLOCV_END, ALLOCV_N, buf, read_comp(), skip_ws(), and strlen().
Referenced by string_to_c(), and string_to_c_strict().
Definition at line 1441 of file complex.c.
References nucomp_s_convert(), and rb_cComplex.
Referenced by nurat_coerce().
Definition at line 1327 of file complex.c.
References FINITE_TYPE_P, id_finite_p, isinf(), nucomp_abs(), Qfalse, Qtrue, RB_FLOAT_TYPE_P, rb_funcall(), and RFLOAT_VALUE.
Referenced by Init_Complex().
Definition at line 1358 of file complex.c.
References FINITE_TYPE_P, id_infinite_p, INT2FIX, isinf(), nucomp_abs(), Qnil, RB_FLOAT_TYPE_P, rb_funcall(), and RFLOAT_VALUE.
Referenced by Init_Complex().
Definition at line 754 of file complex.c.
References CLASS_OF, f_add(), f_complex_new2(), f_mul(), f_sub(), f_zero_p(), get_dat1, get_dat2, k_numeric_p(), rb_num_coerce_bin(), RB_TYPE_P, safe_mul(), and T_COMPLEX.
Referenced by fix_mul().
Definition at line 1429 of file complex.c.
References nucomp_s_canonicalize_internal(), and rb_cComplex.
Referenced by ibf_load_object_complex_rational(), num_imaginary(), and rb_math_sqrt().
Definition at line 673 of file complex.c.
References CLASS_OF, f_add(), f_complex_new2(), get_dat1, get_dat2, k_numeric_p(), rb_num_coerce_bin(), RB_TYPE_P, and T_COMPLEX.
Referenced by fix_plus(), and Init_Complex().
Definition at line 1435 of file complex.c.
References f_complex_polar(), and rb_cComplex.
Referenced by read_comp().
Definition at line 1423 of file complex.c.
References nucomp_s_new_internal(), and rb_cComplex.
Referenced by parser_set_number_literal().
Definition at line 1457 of file complex.c.
References cmp(), and RCOMPLEX_SET_IMAG.
Definition at line 1450 of file complex.c.
References cmp(), and RCOMPLEX_SET_REAL.
Definition at line 1758 of file complex.c.
References INT2FIX, isdecimal(), isimagunit(), issign(), rb_complex_new2, rb_complex_polar(), read_rat(), read_rat_nos(), read_sign(), str2num(), strlen(), and ZERO.
Referenced by parse_comp().
|
inlinestatic |
|
static |
Definition at line 1635 of file complex.c.
References isdecimal().
Referenced by read_den(), and read_num().
|
static |
Definition at line 1672 of file complex.c.
References islettere(), read_digits(), and read_sign().
Referenced by read_rat_nos().
|
static |
Definition at line 1731 of file complex.c.
References read_rat_nos(), and read_sign().
Referenced by read_comp().
|
static |
Definition at line 1713 of file complex.c.
References read_den(), and read_num().
Referenced by read_comp(), and read_rat().
|
static |
Definition at line 1615 of file complex.c.
References issign().
Referenced by read_comp(), read_num(), and read_rat().
Definition at line 729 of file complex.c.
References DBL2NUM, f_mul(), isnan, RB_FLOAT_TYPE_P, RFLOAT_VALUE, and signbit().
Referenced by rb_complex_mul().
|
inlinestatic |
Definition at line 1840 of file complex.c.
Referenced by parse_comp().
|
static |
Definition at line 1748 of file complex.c.
References DBL2NUM, rb_cstr_to_dbl(), rb_cstr_to_inum(), rb_cstr_to_rat(), and strchr().
Referenced by read_comp().
Definition at line 1927 of file complex.c.
References parse_comp(), rb_must_asciicompat(), rb_str_modify(), RSTRING_LEN, and RSTRING_PTR.
Referenced by Init_Complex().
Definition at line 1874 of file complex.c.
References parse_comp(), PRIsVALUE, rb_eArgError, rb_must_asciicompat(), rb_raise(), rb_str_modify(), RSTRING_LEN, and RSTRING_PTR.
Referenced by nucomp_s_convert().
|
static |
Definition at line 33 of file complex.c.
Referenced by Init_Complex().
|
static |
Definition at line 33 of file complex.c.
Referenced by Init_Complex().
|
static |
Definition at line 33 of file complex.c.
Referenced by Init_Complex().
|
static |
Definition at line 33 of file complex.c.
Referenced by Init_Complex(), and nucomp_expt().
|
static |
Definition at line 33 of file complex.c.
Referenced by Init_Complex(), and nucomp_fdiv().
|
static |
Definition at line 33 of file complex.c.
Referenced by Init_Complex(), and rb_complex_finite_p().
|
static |
Definition at line 33 of file complex.c.
Referenced by Init_Complex(), nucomp_loader(), and nucomp_marshal_load().
|
static |
Definition at line 33 of file complex.c.
Referenced by Init_Complex(), nucomp_loader(), and nucomp_marshal_load().
|
static |
Definition at line 33 of file complex.c.
Referenced by Init_Complex(), and rb_complex_infinite_p().
|
static |
Definition at line 33 of file complex.c.
Referenced by Init_Complex().
|
static |
Definition at line 33 of file complex.c.
Referenced by Init_Complex().
|
static |
Definition at line 33 of file complex.c.
Referenced by float_arg(), and Init_Complex().
|
static |
Definition at line 33 of file complex.c.
Referenced by Init_Complex(), and nucomp_div().
|
static |
Definition at line 33 of file complex.c.
Referenced by Init_Complex(), and nucomp_rationalize().
|
static |
Definition at line 33 of file complex.c.
Referenced by Init_Complex().
|
static |
Definition at line 33 of file complex.c.
Referenced by f_to_f(), and Init_Complex().
|
static |
Definition at line 33 of file complex.c.
Referenced by fun1(), and Init_Complex().
|
static |
Definition at line 33 of file complex.c.
Referenced by Init_Complex().
VALUE rb_cComplex |
Definition at line 28 of file complex.c.
Referenced by imp1(), Init_Complex(), m_sin(), nucomp_f_complex(), nucomp_s_convert(), rb_Complex(), rb_complex_new(), rb_complex_polar(), and rb_complex_raw().