Ruby
2.1.10p492(2016-04-01revision54464)
|
#include "ruby/ruby.h"
#include "internal.h"
#include <float.h>
#include <math.h>
#include <errno.h>
Go to the source code of this file.
Macros | |
#define | RB_BIGNUM_TYPE_P(x) RB_TYPE_P((x), T_BIGNUM) |
#define | Need_Float(x) do {if (!RB_TYPE_P(x, T_FLOAT)) {(x) = rb_to_float(x);}} while(0) |
#define | Need_Float2(x, y) |
#define | domain_error(msg) rb_raise(rb_eMathDomainError, "Numerical argument is out of domain - " #msg) |
#define | M_PI 3.14159265358979323846 |
#define | exp1(n) |
#define | exp2(n) |
Variables | |
VALUE | rb_mMath |
VALUE | rb_eMathDomainError |
#define domain_error | ( | msg | ) | rb_raise(rb_eMathDomainError, "Numerical argument is out of domain - " #msg) |
Definition at line 34 of file math.c.
Referenced by math_acos(), math_acosh(), math_asin(), math_atan2(), math_atanh(), math_gamma(), math_lgamma(), math_log(), math_log10(), math_log2(), and math_sqrt().
#define exp1 | ( | n | ) |
#define exp2 | ( | n | ) |
#define M_PI 3.14159265358979323846 |
Referenced by exp1(), and math_atan2().
#define Need_Float | ( | x | ) | do {if (!RB_TYPE_P(x, T_FLOAT)) {(x) = rb_to_float(x);}} while(0) |
Definition at line 28 of file math.c.
Referenced by math_acos(), math_acosh(), math_asin(), math_asinh(), math_atan(), math_atanh(), math_cbrt(), math_cos(), math_cosh(), math_erf(), math_erfc(), math_exp(), math_frexp(), math_gamma(), math_ldexp(), math_lgamma(), math_log(), math_log10(), math_log2(), math_sin(), math_sinh(), math_sqrt(), math_tan(), and math_tanh().
#define Need_Float2 | ( | x, | |
y | |||
) |
Definition at line 29 of file math.c.
Referenced by math_atan2(), and math_hypot().
Definition at line 23 of file math.c.
Referenced by math_log(), math_log10(), and math_log2().
double cosh | ( | double | x | ) |
Definition at line 224 of file math.c.
Referenced by math_cosh(), and tanh().
exp1 | ( | sin | ) |
Definition at line 901 of file math.c.
References DBL2NUM, M_PI, math_acos(), math_acosh(), math_asin(), math_asinh(), math_atan(), math_atan2(), math_atanh(), math_cbrt(), math_cos(), math_cosh(), math_erf(), math_erfc(), math_exp(), math_frexp(), math_gamma(), math_hypot(), math_ldexp(), math_lgamma(), math_log(), math_log10(), math_log2(), math_sin(), math_sinh(), math_sqrt(), math_tan(), math_tanh(), rb_define_class_under(), rb_define_const(), rb_define_module(), rb_define_module_function(), rb_eMathDomainError, rb_eStandardError, and rb_mMath.
exp2 | ( | atan2 | ) |
Definition at line 889 of file math.c.
References argc, argv, and math_log().
double log2 | ( | double | x | ) |
Definition at line 477 of file math.c.
Referenced by math_log2().
Definition at line 164 of file math.c.
References d0, DBL2NUM, domain_error, Need_Float, and RFLOAT_VALUE.
Referenced by exp1().
Definition at line 324 of file math.c.
References acosh(), d0, DBL2NUM, domain_error, Need_Float, and RFLOAT_VALUE.
Referenced by exp1().
Definition at line 190 of file math.c.
References d0, DBL2NUM, domain_error, Need_Float, and RFLOAT_VALUE.
Referenced by exp1().
Definition at line 351 of file math.c.
References asinh(), DBL2NUM, Need_Float, and RFLOAT_VALUE.
Referenced by exp1().
Definition at line 216 of file math.c.
References DBL2NUM, Need_Float, and RFLOAT_VALUE.
Referenced by exp1().
Definition at line 62 of file math.c.
References DBL2NUM, domain_error, isinf(), M_PI, Need_Float2, RFLOAT_VALUE, and signbit().
Referenced by exp1().
Definition at line 372 of file math.c.
References atanh(), d0, DBL2NUM, domain_error, INFINITY, Need_Float, and RFLOAT_VALUE.
Referenced by exp1().
Definition at line 648 of file math.c.
References cbrt(), DBL2NUM, Need_Float, and RFLOAT_VALUE.
Referenced by exp1().
Definition at line 99 of file math.c.
References DBL2NUM, Need_Float, and RFLOAT_VALUE.
Referenced by exp1().
Definition at line 245 of file math.c.
References cosh(), DBL2NUM, Need_Float, and RFLOAT_VALUE.
Referenced by exp1().
Definition at line 726 of file math.c.
References DBL2NUM, erf(), Need_Float, and RFLOAT_VALUE.
Referenced by exp1().
Definition at line 747 of file math.c.
References DBL2NUM, erfc(), Need_Float, and RFLOAT_VALUE.
Referenced by exp1().
Definition at line 404 of file math.c.
References DBL2NUM, Need_Float, and RFLOAT_VALUE.
Referenced by exp1().
Definition at line 666 of file math.c.
References DBL2NUM, INT2NUM, Need_Float, rb_assoc_new(), and RFLOAT_VALUE.
Referenced by exp1().
Definition at line 794 of file math.c.
References d0, DBL2NUM, domain_error, isinf(), Need_Float, numberof, RFLOAT_VALUE, signbit(), and tgamma().
Referenced by exp1().
Definition at line 705 of file math.c.
References DBL2NUM, hypot(), Need_Float2, and RFLOAT_VALUE.
Referenced by exp1().
Definition at line 688 of file math.c.
References DBL2NUM, Need_Float, NUM2INT, and RFLOAT_VALUE.
Referenced by exp1().
Definition at line 857 of file math.c.
References d0, DBL2NUM, domain_error, INFINITY, INT2FIX, isinf(), lgamma_r(), Need_Float, rb_assoc_new(), RFLOAT_VALUE, and signbit().
Referenced by exp1().
Definition at line 441 of file math.c.
References argc, argv, d0, DBL2NUM, DBL_MANT_DIG, DBL_MAX_EXP, domain_error, INFINITY, Need_Float, NULL, rb_absint_numwords(), rb_big_rshift(), RB_BIGNUM_TYPE_P, rb_scan_args(), RBIGNUM_POSITIVE_P, RFLOAT_VALUE, and SIZET2NUM.
Definition at line 546 of file math.c.
References d0, DBL2NUM, DBL_MANT_DIG, DBL_MAX_EXP, domain_error, INFINITY, Need_Float, NULL, rb_absint_numwords(), rb_big_rshift(), RB_BIGNUM_TYPE_P, RBIGNUM_POSITIVE_P, RFLOAT_VALUE, and SIZET2NUM.
Referenced by exp1().
Definition at line 504 of file math.c.
References d0, DBL2NUM, DBL_MANT_DIG, DBL_MAX_EXP, domain_error, INFINITY, log2(), Need_Float, NULL, rb_absint_numwords(), rb_big_rshift(), RB_BIGNUM_TYPE_P, RBIGNUM_POSITIVE_P, RFLOAT_VALUE, and SIZET2NUM.
Referenced by exp1().
Definition at line 121 of file math.c.
References DBL2NUM, Need_Float, and RFLOAT_VALUE.
Referenced by exp1().
Definition at line 274 of file math.c.
References DBL2NUM, Need_Float, RFLOAT_VALUE, and sinh().
Referenced by exp1().
Definition at line 599 of file math.c.
References d0, DBL2NUM, domain_error, Need_Float, and RFLOAT_VALUE.
Referenced by exp1().
Definition at line 143 of file math.c.
References DBL2NUM, Need_Float, and RFLOAT_VALUE.
Referenced by exp1().
Definition at line 303 of file math.c.
References DBL2NUM, Need_Float, RFLOAT_VALUE, and tanh().
Referenced by exp1().
double sinh | ( | double | x | ) |
Definition at line 253 of file math.c.
Referenced by math_sinh(), and tanh().
double tanh | ( | double | x | ) |