|
Ruby 4.0.5p0 (2026-05-20 revision 64336ffd0ee9e1f4c05891695a3d7b49cb709721)
|
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 |
| Old name of rb_num2dbl. | |
| #define | RFLOAT_VALUE rb_float_value |
| Old name of rb_float_value. | |
| #define | DBL2NUM rb_float_new |
| Old name of rb_float_new. | |
Functions | |
| double | rb_num2dbl (VALUE num) |
| Converts an instance of rb_cNumeric into C's double. | |
| double | rb_float_value (VALUE num) |
| Extracts its double value from an instance of rb_cFloat. | |
| VALUE | rb_float_new (double d) |
| Converts a C's double into an instance of rb_cFloat. | |
| VALUE | rb_float_new_in_heap (double d) |
| Identical to rb_float_new(), except it does not generate Flonums. | |
Arithmetic conversion between C's double and Ruby's.
Definition in file double.h.
| VALUE rb_float_new | ( | double | d | ) |
| VALUE rb_float_new_in_heap | ( | double | d | ) |
Identical to rb_float_new(), except it does not generate Flonums.
| [in] | d | Arbitrary double value. |