Ruby: include/ruby/internal/arithmetic/double.h Source File

Ruby 3.2.5p208 (2024-07-26 revision 31d0f1a2e7dbfb60731d1f05b868e1d578cda493)

double.h
Go to the documentation of this file.
1#ifndef RBIMPL_ARITHMETIC_DOUBLE_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RBIMPL_ARITHMETIC_DOUBLE_H
23#include "ruby/internal/attr/pure.h"
24#include "ruby/internal/dllexport.h"
25#include "ruby/internal/value.h"
26
27#define NUM2DBL rb_num2dbl
28#define RFLOAT_VALUE rb_float_value
29#define DBL2NUM rb_float_new
31 RBIMPL_SYMBOL_EXPORT_BEGIN()
39double rb_num2dbl(VALUE num);
40
41 RBIMPL_ATTR_PURE()
49double rb_float_value(VALUE num);
50
57 VALUE rb_float_new(double d);
58
69 VALUE rb_float_new_in_heap(double d);
70 RBIMPL_SYMBOL_EXPORT_END()
71
72#endif /* RBIMPL_ARITHMETIC_DOUBLE_H */
dllexport.h
Tweaking visibility of C variables/functions.
RBIMPL_SYMBOL_EXPORT_END
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
Definition dllexport.h:106
RBIMPL_SYMBOL_EXPORT_BEGIN
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition dllexport.h:97
rb_float_new_in_heap
VALUE rb_float_new_in_heap(double d)
Identical to rb_float_new(), except it does not generate Flonums.
Definition numeric.c:1014
rb_num2dbl
double rb_num2dbl(VALUE num)
Converts an instance of rb_cNumeric into C's double.
Definition object.c:3624
pure.h
Defines RBIMPL_ATTR_PURE.
RBIMPL_ATTR_PURE
#define RBIMPL_ATTR_PURE()
Wraps (or simulates) __attribute__((pure))
Definition pure.h:33
value.h
Defines VALUE and ID.
VALUE
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40