Ruby: include/ruby/internal/intern/complex.h Source File

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

complex.h
Go to the documentation of this file.
1#ifndef RBIMPL_INTERN_COMPLEX_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RBIMPL_INTERN_COMPLEX_H
23#include "ruby/internal/dllexport.h"
24#include "ruby/internal/value.h"
25#include "ruby/internal/arithmetic/long.h" /* INT2FIX is here. */
26
27 RBIMPL_SYMBOL_EXPORT_BEGIN()
28
29/* complex.c */
30 VALUE rb_complex_raw(VALUE, VALUE);
31#define rb_complex_raw1(x) rb_complex_raw((x), INT2FIX(0))
32#define rb_complex_raw2(x,y) rb_complex_raw((x), (y))
33 VALUE rb_complex_new(VALUE, VALUE);
34#define rb_complex_new1(x) rb_complex_new((x), INT2FIX(0))
35#define rb_complex_new2(x,y) rb_complex_new((x), (y))
36 VALUE rb_complex_new_polar(VALUE abs, VALUE arg);
37 DEPRECATED_BY(rb_complex_new_polar, VALUE rb_complex_polar(VALUE abs, VALUE arg));
38 VALUE rb_complex_real(VALUE z);
39 VALUE rb_complex_imag(VALUE z);
40 VALUE rb_complex_plus(VALUE x, VALUE y);
41 VALUE rb_complex_minus(VALUE x, VALUE y);
42 VALUE rb_complex_mul(VALUE x, VALUE y);
43 VALUE rb_complex_div(VALUE x, VALUE y);
44 VALUE rb_complex_uminus(VALUE z);
45 VALUE rb_complex_conjugate(VALUE z);
46 VALUE rb_complex_abs(VALUE z);
47 VALUE rb_complex_arg(VALUE z);
48 VALUE rb_complex_pow(VALUE base, VALUE exp);
49 VALUE rb_dbl_complex_new(double real, double imag);
50#define rb_complex_add rb_complex_plus
51#define rb_complex_sub rb_complex_minus
52#define rb_complex_nagate rb_complex_uminus
53
54 VALUE rb_Complex(VALUE, VALUE);
55#define rb_Complex1(x) rb_Complex((x), INT2FIX(0))
56#define rb_Complex2(x,y) rb_Complex((x), (y))
57
58 RBIMPL_SYMBOL_EXPORT_END()
59
60#endif /* RBIMPL_INTERN_COMPLEX_H */
DEPRECATED_BY
#define DEPRECATED_BY(n, x)
Definition: attributes.h:60
dllexport.h
Tewaking visibility of C variables/functions.
RBIMPL_SYMBOL_EXPORT_END
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
Definition: dllexport.h:86
RBIMPL_SYMBOL_EXPORT_BEGIN
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition: dllexport.h:77
rb_complex_uminus
VALUE rb_complex_uminus(VALUE z)
Definition: complex.c:767
rb_complex_div
VALUE rb_complex_div(VALUE x, VALUE y)
Definition: complex.c:957
rb_complex_plus
VALUE rb_complex_plus(VALUE x, VALUE y)
Definition: complex.c:787
rb_complex_new_polar
VALUE rb_complex_new_polar(VALUE abs, VALUE arg)
Definition: complex.c:1548
rb_complex_arg
VALUE rb_complex_arg(VALUE z)
Definition: complex.c:1217
rb_complex_new
VALUE rb_complex_new(VALUE, VALUE)
Definition: complex.c:1542
rb_complex_raw
VALUE rb_complex_raw(VALUE, VALUE)
Definition: complex.c:1536
rb_dbl_complex_new
VALUE rb_dbl_complex_new(double real, double imag)
Creates a Complex object.
Definition: complex.c:1576
rb_complex_abs
VALUE rb_complex_abs(VALUE z)
Definition: complex.c:1170
rb_complex_real
VALUE rb_complex_real(VALUE z)
Definition: complex.c:735
rb_complex_polar
VALUE rb_complex_polar(VALUE abs, VALUE arg)
Definition: complex.c:1554
rb_Complex
VALUE rb_Complex(VALUE, VALUE)
Definition: complex.c:1560
rb_complex_mul
VALUE rb_complex_mul(VALUE x, VALUE y)
Definition: complex.c:881
rb_complex_conjugate
VALUE rb_complex_conjugate(VALUE z)
Definition: complex.c:1263
rb_complex_minus
VALUE rb_complex_minus(VALUE x, VALUE y)
Definition: complex.c:821
rb_complex_pow
VALUE rb_complex_pow(VALUE base, VALUE exp)
Definition: complex.c:994
rb_complex_imag
VALUE rb_complex_imag(VALUE z)
Definition: complex.c:752
long.h
Arithmetic conversion between C's long and Ruby's.
value.h
Defines VALUE and ID.
VALUE
unsigned long VALUE
Definition: value.h:38