Groonga 3.0.9 Source Code Document
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Macros | Functions
numeric.c File Reference
#include <float.h>
#include <limits.h>
#include <math.h>
#include <stdlib.h>
#include "mruby.h"
#include "mruby/array.h"
#include "mruby/numeric.h"
#include "mruby/string.h"
Include dependency graph for numeric.c:

Go to the source code of this file.

Macros

#define SQRT_INT_MAX   ((mrb_int)1<<((sizeof(mrb_int)*CHAR_BIT-1)/2))
#define FIT_SQRT_INT(n)   (((n)<SQRT_INT_MAX)&&((n)>=-SQRT_INT_MAX))
#define NUMERIC_SHIFT_WIDTH_MAX   (sizeof(mrb_int)*CHAR_BIT-1)

Functions

mrb_value mrb_num_div (mrb_state *mrb, mrb_value x, mrb_value y)
mrb_value mrb_flo_to_str (mrb_state *mrb, mrb_value flo, int max_digit)
mrb_value mrb_fixnum_mul (mrb_state *mrb, mrb_value x, mrb_value y)
mrb_value mrb_flo_to_fixnum (mrb_state *mrb, mrb_value x)
mrb_value mrb_fixnum_plus (mrb_state *mrb, mrb_value x, mrb_value y)
mrb_value mrb_fixnum_minus (mrb_state *mrb, mrb_value x, mrb_value y)
mrb_value mrb_fixnum_to_str (mrb_state *mrb, mrb_value x, int base)
void mrb_init_numeric (mrb_state *mrb)

Macro Definition Documentation

#define FIT_SQRT_INT (   n)    (((n)<SQRT_INT_MAX)&&((n)>=-SQRT_INT_MAX))

Definition at line 736 of file numeric.c.

#define NUMERIC_SHIFT_WIDTH_MAX   (sizeof(mrb_int)*CHAR_BIT-1)

Definition at line 998 of file numeric.c.

#define SQRT_INT_MAX   ((mrb_int)1<<((sizeof(mrb_int)*CHAR_BIT-1)/2))

Definition at line 734 of file numeric.c.

Function Documentation

mrb_value mrb_fixnum_minus ( mrb_state mrb,
mrb_value  x,
mrb_value  y 
)

Definition at line 1204 of file numeric.c.

mrb_value mrb_fixnum_mul ( mrb_state mrb,
mrb_value  x,
mrb_value  y 
)

Definition at line 739 of file numeric.c.

mrb_value mrb_fixnum_plus ( mrb_state mrb,
mrb_value  x,
mrb_value  y 
)

Definition at line 1165 of file numeric.c.

mrb_value mrb_fixnum_to_str ( mrb_state mrb,
mrb_value  x,
int  base 
)

Definition at line 1244 of file numeric.c.

Here is the call graph for this function:

Here is the caller graph for this function:

mrb_value mrb_flo_to_fixnum ( mrb_state mrb,
mrb_value  x 
)

Definition at line 1142 of file numeric.c.

Here is the call graph for this function:

Here is the caller graph for this function:

mrb_value mrb_flo_to_str ( mrb_state mrb,
mrb_value  flo,
int  max_digit 
)

Definition at line 165 of file numeric.c.

Here is the call graph for this function:

void mrb_init_numeric ( mrb_state mrb)

Definition at line 1356 of file numeric.c.

Here is the call graph for this function:

Here is the caller graph for this function:

mrb_value mrb_num_div ( mrb_state mrb,
mrb_value  x,
mrb_value  y 
)

Definition at line 112 of file numeric.c.