Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)
|
Public APIs related to rb_cComplex. More...
#include "ruby/internal/dllexport.h"
#include "ruby/internal/value.h"
#include "ruby/internal/arithmetic/long.h"
Go to the source code of this file.
Macros | |
#define | rb_complex_raw1(x) rb_complex_raw((x), INT2FIX(0)) |
#define | rb_complex_raw2(x, y) rb_complex_raw((x), (y)) |
#define | rb_complex_new1(x) rb_complex_new((x), INT2FIX(0)) |
#define | rb_complex_new2(x, y) rb_complex_new((x), (y)) |
#define | rb_complex_add rb_complex_plus |
#define | rb_complex_sub rb_complex_minus |
#define | rb_complex_nagate rb_complex_uminus |
#define | rb_Complex1(x) rb_Complex((x), INT2FIX(0)) |
#define | rb_Complex2(x, y) rb_Complex((x), (y)) |
Functions | |
VALUE | rb_complex_raw (VALUE, VALUE) |
VALUE | rb_complex_new (VALUE, VALUE) |
VALUE | rb_complex_new_polar (VALUE abs, VALUE arg) |
VALUE | rb_complex_polar (VALUE abs, VALUE arg) |
VALUE | rb_complex_real (VALUE z) |
VALUE | rb_complex_imag (VALUE z) |
VALUE | rb_complex_plus (VALUE x, VALUE y) |
VALUE | rb_complex_minus (VALUE x, VALUE y) |
VALUE | rb_complex_mul (VALUE x, VALUE y) |
VALUE | rb_complex_div (VALUE x, VALUE y) |
VALUE | rb_complex_uminus (VALUE z) |
VALUE | rb_complex_conjugate (VALUE z) |
VALUE | rb_complex_abs (VALUE z) |
VALUE | rb_complex_arg (VALUE z) |
VALUE | rb_complex_pow (VALUE base, VALUE exp) |
VALUE | rb_dbl_complex_new (double real, double imag) |
Creates a Complex object. More... | |
VALUE | rb_Complex (VALUE, VALUE) |
Public APIs related to rb_cComplex.
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 complex.h.
#define rb_Complex1 | ( | x | ) | rb_Complex((x), INT2FIX(0)) |
#define rb_Complex2 | ( | x, | |
y | |||
) | rb_Complex((x), (y)) |
#define rb_complex_add rb_complex_plus |
#define rb_complex_nagate rb_complex_uminus |
#define rb_complex_new1 | ( | x | ) | rb_complex_new((x), INT2FIX(0)) |
#define rb_complex_new2 | ( | x, | |
y | |||
) | rb_complex_new((x), (y)) |
#define rb_complex_raw1 | ( | x | ) | rb_complex_raw((x), INT2FIX(0)) |
#define rb_complex_raw2 | ( | x, | |
y | |||
) | rb_complex_raw((x), (y)) |
#define rb_complex_sub rb_complex_minus |
Definition at line 1560 of file complex.c.
References rb_cComplex.
Definition at line 1170 of file complex.c.
References f_abs, get_dat1, and rb_math_hypot().
Referenced by Init_Complex().
Definition at line 1217 of file complex.c.
References get_dat1, and rb_math_atan2().
Referenced by Init_Complex().
Definition at line 957 of file complex.c.
Referenced by Init_Complex(), and rb_numeric_quo().
Definition at line 821 of file complex.c.
References CLASS_OF, f_sub, get_dat1, get_dat2, rb_num_coerce_bin(), and T_COMPLEX.
Referenced by Init_Complex().
Definition at line 881 of file complex.c.
References CLASS_OF, f_mul, get_dat1, get_dat2, rb_num_coerce_bin(), and T_COMPLEX.
Referenced by Init_Complex().
Definition at line 1542 of file complex.c.
References rb_cComplex.
Referenced by rb_dbl_complex_new_polar_pi().
Definition at line 1548 of file complex.c.
References rb_cComplex.
Referenced by rb_complex_polar().
Definition at line 787 of file complex.c.
References CLASS_OF, f_add, get_dat1, get_dat2, rb_num_coerce_bin(), and T_COMPLEX.
Referenced by Init_Complex().
Definition at line 1554 of file complex.c.
References rb_complex_new_polar().
Definition at line 994 of file complex.c.
References CLASS_OF, f_abs, f_add, f_expt, f_mul, f_negate, f_reciprocal, f_sub, FIX2LONG, FIXNUM_P, get_dat1, id_expt, k_exact_zero_p, LONG2FIX, ONE, rb_int_uminus(), rb_num_coerce_bin(), rb_num_pow(), rb_warn(), RRATIONAL, T_BIGNUM, T_COMPLEX, T_RATIONAL, TWO, and ZERO.
Referenced by Init_Complex(), and rb_num_pow().
Definition at line 1536 of file complex.c.
References rb_cComplex.
Referenced by rb_dbl_complex_new().
VALUE rb_dbl_complex_new | ( | double | real, |
double | imag | ||
) |
Creates a Complex object.
real | real part value |
imag | imaginary part value |
Definition at line 1576 of file complex.c.
References DBL2NUM, and rb_complex_raw().