Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)
|
Arithmetic conversion between C's double
and Ruby's.
More...
#include "ruby/internal/attr/pure.h"
#include "ruby/internal/dllexport.h"
#include "ruby/internal/value.h"
Go to the source code of this file.
Macros | |
#define | NUM2DBL rb_num2dbl |
#define | RFLOAT_VALUE rb_float_value |
#define | DBL2NUM rb_float_new |
Functions | |
double | rb_num2dbl (VALUE) |
Converts a Numeric object to double . More... | |
double | rb_float_value (VALUE) |
VALUE | rb_float_new (double) |
VALUE | rb_float_new_in_heap (double) |
Arithmetic conversion between C's double
and Ruby's.
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 double.h.
#define DBL2NUM rb_float_new |
#define NUM2DBL rb_num2dbl |
#define RFLOAT_VALUE rb_float_value |
VALUE rb_float_new_in_heap | ( | double | d | ) |
Definition at line 922 of file numeric.c.
References FL_WB_PROTECTED, NEWOBJ_OF, OBJ_FREEZE, rb_cFloat, RGENGC_WB_PROTECTED_FLOAT, and T_FLOAT.