Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals

math.c File Reference

#include "ruby.h"
#include <math.h>
#include <errno.h>

Go to the source code of this file.

Defines

#define Need_Float(x)   (x) = rb_Float(x)
#define Need_Float2(x, y)

Functions

VALUE math_atan2 (VALUE obj, VALUE y, VALUE x)
VALUE math_cos (VALUE obj, VALUE x)
VALUE math_sin (VALUE obj, VALUE x)
VALUE math_tan (VALUE obj, VALUE x)
VALUE math_acos (VALUE obj, VALUE x)
VALUE math_asin (VALUE obj, VALUE x)
VALUE math_atan (VALUE obj, VALUE x)
VALUE math_cosh (VALUE obj, VALUE x)
VALUE math_sinh (VALUE obj, VALUE x)
VALUE math_tanh (VALUE obj, VALUE x)
VALUE math_acosh (VALUE obj, VALUE x)
VALUE math_asinh (VALUE obj, VALUE x)
VALUE math_atanh (VALUE obj, VALUE x)
VALUE math_exp (VALUE obj, VALUE x)
VALUE math_log (VALUE obj, VALUE x)
VALUE math_log10 (VALUE obj, VALUE x)
VALUE math_sqrt (VALUE obj, VALUE x)
VALUE math_frexp (VALUE obj, VALUE x)
VALUE math_ldexp (VALUE obj, VALUE x, VALUE n)
VALUE math_hypot (VALUE obj, VALUE x, VALUE y)
VALUE math_erf (VALUE obj, VALUE x)
VALUE math_erfc (VALUE obj, VALUE x)
void Init_Math ()

Variables

VALUE rb_mMath


Define Documentation

#define Need_Float  )     (x) = rb_Float(x)
 

Definition at line 19 of file math.c.

Referenced by math_acos(), math_acosh(), math_asin(), math_asinh(), math_atan(), math_atanh(), math_cos(), math_cosh(), math_erf(), math_erfc(), math_exp(), math_frexp(), math_ldexp(), math_log(), math_log10(), math_sin(), math_sinh(), math_sqrt(), math_tan(), and math_tanh().

#define Need_Float2 x,
 ) 
 

Value:

do {\
    Need_Float(x);\
    Need_Float(y);\
} while (0)

Definition at line 20 of file math.c.

Referenced by math_atan2(), and math_hypot().


Function Documentation

void Init_Math void   ) 
 

Definition at line 479 of file math.c.

References math_acos(), math_acosh(), math_asin(), math_asinh(), math_atan(), math_atan2(), math_atanh(), math_cos(), math_cosh(), math_erf(), math_erfc(), math_exp(), math_frexp(), math_hypot(), math_ldexp(), math_log(), math_log10(), math_sin(), math_sinh(), math_sqrt(), math_tan(), math_tanh(), rb_define_const(), rb_define_module(), rb_define_module_function(), rb_float_new(), and rb_mMath.

Referenced by rb_call_inits().

VALUE math_acos VALUE  obj,
VALUE  x
[static]
 

Definition at line 103 of file math.c.

References Need_Float, rb_float_new(), rb_sys_fail(), RFLOAT, and VALUE.

Referenced by Init_Math().

VALUE math_acosh VALUE  obj,
VALUE  x
[static]
 

Definition at line 237 of file math.c.

References acosh(), Need_Float, rb_float_new(), rb_sys_fail(), RFLOAT, and VALUE.

Referenced by Init_Math().

VALUE math_asin VALUE  obj,
VALUE  x
[static]
 

Definition at line 125 of file math.c.

References Need_Float, rb_float_new(), rb_sys_fail(), RFLOAT, and VALUE.

Referenced by Init_Math().

VALUE math_asinh VALUE  obj,
VALUE  x
[static]
 

Definition at line 259 of file math.c.

References asinh(), Need_Float, rb_float_new(), RFLOAT, and VALUE.

Referenced by Init_Math().

VALUE math_atan VALUE  obj,
VALUE  x
[static]
 

Definition at line 147 of file math.c.

References Need_Float, rb_float_new(), RFLOAT, and VALUE.

Referenced by Init_Math().

VALUE math_atan2 VALUE  obj,
VALUE  y,
VALUE  x
[static]
 

Definition at line 36 of file math.c.

References Need_Float2, rb_float_new(), RFLOAT, and VALUE.

Referenced by Init_Math().

VALUE math_atanh VALUE  obj,
VALUE  x
[static]
 

Definition at line 274 of file math.c.

References atanh(), Need_Float, rb_float_new(), rb_sys_fail(), RFLOAT, and VALUE.

Referenced by Init_Math().

VALUE math_cos VALUE  obj,
VALUE  x
[static]
 

Definition at line 54 of file math.c.

References Need_Float, rb_float_new(), RFLOAT, and VALUE.

Referenced by Init_Math().

VALUE math_cosh VALUE  obj,
VALUE  x
[static]
 

Definition at line 171 of file math.c.

References Need_Float, rb_float_new(), RFLOAT, and VALUE.

Referenced by Init_Math().

VALUE math_erf VALUE  obj,
VALUE  x
[static]
 

Definition at line 448 of file math.c.

References erf(), Need_Float, rb_float_new(), RFLOAT, and VALUE.

Referenced by Init_Math().

VALUE math_erfc VALUE  obj,
VALUE  x
[static]
 

Definition at line 463 of file math.c.

References erfc(), Need_Float, rb_float_new(), RFLOAT, and VALUE.

Referenced by Init_Math().

VALUE math_exp VALUE  obj,
VALUE  x
[static]
 

Definition at line 296 of file math.c.

References Need_Float, rb_float_new(), RFLOAT, and VALUE.

Referenced by Init_Math().

VALUE math_frexp VALUE  obj,
VALUE  x
[static]
 

Definition at line 392 of file math.c.

References INT2NUM, Need_Float, rb_assoc_new(), rb_float_new(), RFLOAT, and VALUE.

Referenced by Init_Math().

VALUE math_hypot VALUE  obj,
VALUE  x,
VALUE  y
[static]
 

Definition at line 433 of file math.c.

References hypot(), Need_Float2, rb_float_new(), RFLOAT, and VALUE.

Referenced by Init_Math().

VALUE math_ldexp VALUE  obj,
VALUE  x,
VALUE  n
[static]
 

Definition at line 415 of file math.c.

References Need_Float, NUM2INT, rb_float_new(), RFLOAT, and VALUE.

Referenced by Init_Math().

VALUE math_log VALUE  obj,
VALUE  x
[static]
 

Definition at line 320 of file math.c.

References Need_Float, rb_float_new(), rb_sys_fail(), RFLOAT, and VALUE.

Referenced by Init_Math().

VALUE math_log10 VALUE  obj,
VALUE  x
[static]
 

Definition at line 342 of file math.c.

References Need_Float, rb_float_new(), rb_sys_fail(), RFLOAT, and VALUE.

Referenced by Init_Math().

VALUE math_sin VALUE  obj,
VALUE  x
[static]
 

Definition at line 70 of file math.c.

References Need_Float, rb_float_new(), RFLOAT, and VALUE.

Referenced by Init_Math().

VALUE math_sinh VALUE  obj,
VALUE  x
[static]
 

Definition at line 197 of file math.c.

References Need_Float, rb_float_new(), RFLOAT, and VALUE.

Referenced by Init_Math().

VALUE math_sqrt VALUE  obj,
VALUE  x
[static]
 

Definition at line 365 of file math.c.

References Need_Float, rb_float_new(), rb_sys_fail(), RFLOAT, and VALUE.

Referenced by Init_Math().

VALUE math_tan VALUE  obj,
VALUE  x
[static]
 

Definition at line 87 of file math.c.

References Need_Float, rb_float_new(), RFLOAT, and VALUE.

Referenced by Init_Math().

VALUE math_tanh VALUE  obj,
VALUE  x
[static]
 

Definition at line 222 of file math.c.

References Need_Float, rb_float_new(), RFLOAT, and VALUE.

Referenced by Init_Math().


Variable Documentation

VALUE rb_mMath
 

Definition at line 17 of file math.c.

Referenced by Init_Math().


Generated on Wed Jan 18 23:32:09 2006 for Ruby by doxygen 1.3.5