Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)
|
Public APIs related to rb_cNumeric. More...
#include "ruby/internal/dllexport.h"
#include "ruby/internal/value.h"
#include "ruby/backward/2/attributes.h"
Go to the source code of this file.
Macros | |
#define | RB_NUM_COERCE_FUNCS_NEED_OPID 1 |
Functions | |
void | rb_num_zerodiv (void) |
VALUE | rb_num_coerce_bin (VALUE, VALUE, ID) |
VALUE | rb_num_coerce_cmp (VALUE, VALUE, ID) |
VALUE | rb_num_coerce_relop (VALUE, VALUE, ID) |
VALUE | rb_num_coerce_bit (VALUE, VALUE, ID) |
VALUE | rb_num2fix (VALUE) |
VALUE | rb_fix2str (VALUE, int) |
VALUE | rb_dbl_cmp (double, double) |
Public APIs related to rb_cNumeric.
RBIMPL
or rbimpl
are implementation details. Don't take them as canon. They could rapidly appear then vanish. The name (path) of this header file is also an implementation detail. Do not expect it to persist at the place it is now. Developers are free to move it anywhere anytime at will. __VA_ARGS__
is always available. We assume C99 for ruby itself but we don't assume languages of extension libraries. They could be written in C++98. Definition in file numeric.h.
VALUE rb_dbl_cmp | ( | double | a, |
double | b | ||
) |
Definition at line 3495 of file numeric.c.
References CHAR_BIT, FIX2LONG, int(), long(), neg, rb_bug(), rb_eArgError, rb_raise(), rb_usascii_str_new, rb_usascii_str_new2, ruby_digitmap, and SIZEOF_VALUE.
Referenced by ole_typedesc2val(), and rb_int2str().
Definition at line 3140 of file numeric.c.
References FIXABLE, FIXNUM_P, LONG2FIX, rb_eRangeError, rb_num2long(), and rb_raise().
Definition at line 452 of file numeric.c.
References rb_funcall(), and TRUE.
Referenced by rb_big_divmod(), rb_big_fdiv_double(), rb_big_minus(), rb_big_modulo(), rb_big_mul(), rb_big_plus(), rb_big_pow(), rb_big_remainder(), rb_complex_minus(), rb_complex_mul(), rb_complex_plus(), rb_complex_pow(), rb_float_div(), rb_float_minus(), rb_float_mul(), rb_float_plus(), rb_float_pow(), rb_int_minus(), rb_int_mul(), rb_int_plus(), rb_rational_div(), rb_rational_minus(), rb_rational_mul(), rb_rational_plus(), and rb_rational_pow().
Definition at line 4395 of file numeric.c.
References Qundef, rb_exec_recursive_paired(), and TRUE.
Referenced by rb_big_and(), rb_big_or(), and rb_big_xor().
Definition at line 459 of file numeric.c.
References FALSE, Qnil, and rb_funcall().
Referenced by rb_big_cmp(), rb_rational_cmp(), and ruby_num_interval_step_size().
Definition at line 474 of file numeric.c.
References FALSE, Qnil, rb_cmperr(), rb_funcall(), and UNREACHABLE_RETURN.
Referenced by rb_float_gt().
void rb_num_zerodiv | ( | void | ) |
Definition at line 199 of file numeric.c.
References rb_eZeroDivError, and rb_raise().
Referenced by rb_big_divrem_normal(), rb_int_powm(), rb_rational_div(), and rb_rational_pow().