![]() |
mruby 3.3.0
mruby is the lightweight implementation of the Ruby language
|
#include "common.h"
Go to the source code of this file.
Macros | |
#define | TYPED_POSFIXABLE(f, t) ((f) <= (t)MRB_FIXNUM_MAX) |
Numeric class and it's sub-classes. | |
#define | TYPED_NEGFIXABLE(f, t) ((f) >= (t)MRB_FIXNUM_MIN) |
#define | TYPED_FIXABLE(f, t) (TYPED_POSFIXABLE(f,t) && TYPED_NEGFIXABLE(f,t)) |
#define | POSFIXABLE(f) TYPED_POSFIXABLE(f,mrb_int) |
#define | NEGFIXABLE(f) TYPED_NEGFIXABLE(f,mrb_int) |
#define | FIXABLE(f) TYPED_FIXABLE(f,mrb_int) |
#define | FIXABLE_FLOAT(f) TYPED_FIXABLE(f,mrb_float) |
#define | mrb_num_plus(mrb, x, y) mrb_num_add(mrb, x, y) |
#define | mrb_num_minus(mrb, x, y) mrb_num_sub(mrb, x, y) |
#define | mrb_fixnum_to_str(mrb, x, base) mrb_integer_to_str(mrb, x, base) |
#define | __has_builtin(x) 0 |
#define | MRB_INT_OVERFLOW_MASK ((mrb_uint)1 << (MRB_INT_BIT - 1)) |
#define | MRB_FLT_RADIX FLT_RADIX |
#define | MRB_FLT_MANT_DIG DBL_MANT_DIG |
#define | MRB_FLT_EPSILON DBL_EPSILON |
#define | MRB_FLT_DIG DBL_DIG |
#define | MRB_FLT_MIN_EXP DBL_MIN_EXP |
#define | MRB_FLT_MIN DBL_MIN |
#define | MRB_FLT_MIN_10_EXP DBL_MIN_10_EXP |
#define | MRB_FLT_MAX_EXP DBL_MAX_EXP |
#define | MRB_FLT_MAX DBL_MAX |
#define | MRB_FLT_MAX_10_EXP DBL_MAX_10_EXP |
Functions | |
mrb_value | mrb_num_add (mrb_state *mrb, mrb_value x, mrb_value y) |
mrb_value | mrb_num_sub (mrb_state *mrb, mrb_value x, mrb_value y) |
mrb_value | mrb_num_mul (mrb_state *mrb, mrb_value x, mrb_value y) |
mrb_value | mrb_integer_to_str (mrb_state *mrb, mrb_value x, mrb_int base) |
char * | mrb_int_to_cstr (char *buf, size_t len, mrb_int n, mrb_int base) |
static mrb_bool | mrb_int_add_overflow (mrb_int a, mrb_int b, mrb_int *c) |
static mrb_bool | mrb_int_sub_overflow (mrb_int a, mrb_int b, mrb_int *c) |
static mrb_bool | mrb_int_mul_overflow (mrb_int a, mrb_int b, mrb_int *c) |
mrb_value | mrb_float_to_integer (mrb_state *mrb, mrb_value val) |
mrb_float | mrb_div_float (mrb_float x, mrb_float y) |
mrb_value | mrb_float_to_str (mrb_state *mrb, mrb_value x, const char *fmt) |
int | mrb_format_float (mrb_float f, char *buf, size_t buf_size, char fmt, int prec, char sign) |
See Copyright Notice in mruby.h
#define TYPED_POSFIXABLE | ( | f, | |
t | |||
) | ((f) <= (t)MRB_FIXNUM_MAX) |
Numeric class and it's sub-classes.
Integer and Float