1 #ifndef RBIMPL_INTERN_RATIONAL_H
2 #define RBIMPL_INTERN_RATIONAL_H
51 #define rb_rational_raw1(x) rb_rational_raw((x), INT2FIX(1))
54 #define rb_rational_raw2(x,y) rb_rational_raw((x), (y))
74 #define rb_rational_new1(x) rb_rational_new((x), INT2FIX(1))
77 #define rb_rational_new2(x,y) rb_rational_new((x), (y))
116 #define rb_Rational1(x) rb_Rational((x), INT2FIX(1))
119 #define rb_Rational2(x,y) rb_Rational((x), (y))
Tweaking visibility of C variables/functions.
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
VALUE rb_rational_raw(VALUE num, VALUE den)
Identical to rb_rational_new(), except it skips argument validations.
VALUE rb_rational_new(VALUE num, VALUE den)
Constructs a Rational, with reduction.
VALUE rb_Rational(VALUE num, VALUE den)
Converts various values into a Rational.
VALUE rb_rational_num(VALUE rat)
Queries the numerator of the passed Rational.
VALUE rb_flt_rationalize(VALUE flt)
Identical to rb_flt_rationalize_with_prec(), except it auto-detects appropriate precision depending o...
VALUE rb_flt_rationalize_with_prec(VALUE flt, VALUE prec)
Simplified approximation of a float.
VALUE rb_rational_den(VALUE rat)
Queries the denominator of the passed Rational.
RBIMPL_ATTR_PURE() int rb_io_read_pending(rb_io_t *fptr)
Queries if the passed IO has any pending reads.
Arithmetic conversion between C's long and Ruby's.
Defines RBIMPL_ATTR_PURE.
uintptr_t VALUE
Type that represents a Ruby object.