wcalc  2.5
About: Wcalc is a natural-expression command-line calculator.
  Fossies Dox: wcalc-2.5.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

number.h File Reference
#include <gmp.h>
#include <mpfr.h>
Include dependency graph for number.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define HAVE_LIBMPFR
 
#define Number   mpfr_t
 
#define NUM_PREC_MIN   MPFR_PREC_MIN
 
#define NUM_PREC_MAX   MPFR_PREC_MAX
 
#define num_init(n)   mpfr_init(n)
 
#define num_init_set(n1, n2)   mpfr_init_set((n1), (n2), GMP_RNDN)
 
#define num_init_set_d(n, d)   mpfr_init_set_d((n), (d), GMP_RNDN)
 
#define num_init_set_ui(n, ui)   mpfr_init_set_ui((n), (ui), GMP_RNDN)
 
#define num_init_set_str(n, str, base)   mpfr_init_set_str((n), (str), (base), GMP_RNDN)
 
#define num_free(n)   mpfr_clear(n)
 
#define num_get_d(n)   mpfr_get_d((n), GMP_RNDN)
 
#define num_get_ui(n)   mpfr_get_ui((n), GMP_RNDN)
 
#define num_get_str(a, b, c, d, e)   mpfr_get_str(a, b, c, d, e, GMP_RNDN)
 
#define num_free_str(a)   mpfr_free_str(a)
 
#define num_set(n1, n2)   mpfr_set((n1), (n2), GMP_RNDN)
 
#define num_set_d(n, d)   mpfr_set_d((n), (d), GMP_RNDN)
 
#define num_set_ui(n, ui)   mpfr_set_ui((n), (ui), GMP_RNDN)
 
#define num_set_str(n, str, base)   mpfr_set_str((n), (str), (base), GMP_RNDN)
 
#define num_set_nan(n)   mpfr_set_nan(n)
 
#define num_set_inf(n, s)   mpfr_set_inf(n, s)
 
#define num_add(ret, n1, n2)   mpfr_add((ret), (n1), (n2), GMP_RNDN)
 
#define num_sub(ret, n1, n2)   mpfr_sub((ret), (n1), (n2), GMP_RNDN)
 
#define num_add_ui(ret, n, ui)   mpfr_add_ui((ret), (n), (ui), GMP_RNDN)
 
#define num_sub_ui(ret, n, ui)   mpfr_sub_ui((ret), (n), (ui), GMP_RNDN)
 
#define num_mul(ret, n1, n2)   mpfr_mul((ret), (n1), (n2), GMP_RNDN)
 
#define num_mul_si(ret, n, si)   mpfr_mul_si((ret), (n), (si), GMP_RNDN)
 
#define num_mul_ui(ret, n, ui)   mpfr_mul_ui((ret), (n), (ui), GMP_RNDN)
 
#define num_sqr(ret, n)   mpfr_sqr((ret), (n), GMP_RNDN)
 
#define num_sqrt(ret, n)   mpfr_sqrt((ret), (n), GMP_RNDN)
 
#define num_cbrt(ret, n)   mpfr_cbrt((ret), (n), GMP_RNDN)
 
#define num_div(ret, n1, n2)   mpfr_div((ret), (n1), (n2), GMP_RNDN)
 
#define num_div_ui(ret, n, ui)   mpfr_div_ui((ret), (n), (ui), GMP_RNDN)
 
#define num_rint(ret, n)   mpfr_rint((ret), (n), GMP_RNDN)
 
#define num_rintz(ret, n)   mpfr_rint((ret), (n), GMP_RNDZ)
 
#define num_floor(ret, n)   mpfr_floor((ret), (n))
 
#define num_ceil(ret, n)   mpfr_ceil((ret), (n))
 
#define num_pow(ret, n, exp)   mpfr_pow((ret), (n), (exp), GMP_RNDN)
 
#define num_pow_si(ret, n, exp)   mpfr_pow_si((ret), (n), (exp), GMP_RNDN)
 
#define num_exp(ret, n)   mpfr_exp((ret), (n), GMP_RNDN)
 
#define num_factorial(ret, op)   mpfr_fac_ui((ret), (op), GMP_RNDN)
 
#define num_log10(ret, n)   mpfr_log10((ret), (n), GMP_RNDN)
 
#define num_log2(ret, n)   mpfr_log2((ret), (n), GMP_RNDN)
 
#define num_log(ret, n)   mpfr_log((ret), (n), GMP_RNDN)
 
#define num_sin(ret, n)   mpfr_sin((ret), (n), GMP_RNDN)
 
#define num_cos(ret, n)   mpfr_cos((ret), (n), GMP_RNDN)
 
#define num_tan(ret, n)   mpfr_tan((ret), (n), GMP_RNDN)
 
#define num_asin(ret, n)   mpfr_asin((ret), (n), GMP_RNDN)
 
#define num_acos(ret, n)   mpfr_acos((ret), (n), GMP_RNDN)
 
#define num_atan(ret, n)   mpfr_atan((ret), (n), GMP_RNDN)
 
#define num_sinh(ret, n)   mpfr_sinh((ret), (n), GMP_RNDN)
 
#define num_cosh(ret, n)   mpfr_cosh((ret), (n), GMP_RNDN)
 
#define num_tanh(ret, n)   mpfr_tanh((ret), (n), GMP_RNDN)
 
#define num_asinh(ret, n)   mpfr_asinh((ret), (n), GMP_RNDN)
 
#define num_acosh(ret, n)   mpfr_acosh((ret), (n), GMP_RNDN)
 
#define num_atanh(ret, n)   mpfr_atanh((ret), (n), GMP_RNDN)
 
#define num_acoth(ret, n)
 
#define num_asech(ret, n)
 
#define num_acsch(ret, n)
 
#define num_random(n)   mpfr_urandomb((n), randstate)
 
#define num_zeta(ret, n)   mpfr_zeta((ret), (n), GMP_RNDN);
 
#define num_sinc(ret, n)
 
#define num_const_pi(n)   mpfr_const_pi((n), GMP_RNDN)
 
#define num_const_euler(n)   mpfr_const_euler((n), GMP_RNDN)
 
#define num_out_str(fd, base, n)   mpfr_out_str((fd), (base), 0, (n), GMP_RNDN)
 
#define num_is_nan(n)   mpfr_nan_p(n)
 
#define num_is_inf(n)   mpfr_inf_p(n)
 
#define num_is_zero(n)   mpfr_zero_p(n)
 
#define num_is_equal(n1, n2)   mpfr_equal_p((n1), (n2))
 
#define num_is_greater(n1, n2)   mpfr_greater_p((n1), (n2))
 
#define num_is_greaterequal(n1, n2)   mpfr_greaterequal_p((n1), (n2))
 
#define num_is_less(n1, n2)   mpfr_less_p((n1), (n2))
 
#define num_is_lessequal(n1, n2)   mpfr_lessequal_p((n1), (n2))
 
#define num_sign(n)   mpfr_sgn(n)
 
#define num_neg(ret, n)   mpfr_neg((ret), (n), GMP_RNDN)
 
#define num_abs(ret, n)   mpfr_abs((ret), (n), GMP_RNDN)
 
#define num_cmp_si(n, si)   mpfr_cmp_si((n), (si))
 
#define num_get_default_prec()   mpfr_get_default_prec()
 
#define num_set_default_prec(prec)   mpfr_set_default_prec(prec)
 
#define num_const_catalan(n)   num_set_str((n), W_CATALAN, 0)
 
#define num_cot(ret, n)
 
#define num_sec(ret, n)
 
#define num_csc(ret, n)
 
#define num_coth(ret, n)
 
#define num_sech(ret, n)
 
#define num_csch(ret, n)
 
#define num_bor(ret, n1, n2)
 
#define num_band(ret, n1, n2)
 
#define num_bxor(ret, n1, n2)
 
#define num_trunc(ret, n)   mpfr_trunc((ret), (n))
 
#define num_comp(ret, n)
 
#define num_bnot(ret, n)   mpfr_set_ui((ret), ~mpfr_get_ui((n), GMP_RNDN), GMP_RNDN)
 

Typedefs

typedef mp_exp_t num_exp_t
 
typedef mp_prec_t num_prec_t
 

Functions

void init_numbers (void)
 
int is_int (const mpfr_t)
 

Variables

gmp_randstate_t randstate
 

Macro Definition Documentation

◆ HAVE_LIBMPFR

#define HAVE_LIBMPFR

Definition at line 8 of file number.h.

◆ num_abs

#define num_abs (   ret,
 
)    mpfr_abs((ret), (n), GMP_RNDN)

Definition at line 127 of file number.h.

◆ num_acos

#define num_acos (   ret,
 
)    mpfr_acos((ret), (n), GMP_RNDN)

Definition at line 80 of file number.h.

◆ num_acosh

#define num_acosh (   ret,
 
)    mpfr_acosh((ret), (n), GMP_RNDN)

Definition at line 86 of file number.h.

◆ num_acoth

#define num_acoth (   ret,
 
)
Value:
do { \
mpfr_pow_si((n), (n), -1, GMP_RNDN); \
mpfr_atanh((ret), (n), GMP_RNDN); \
} while (0)

Definition at line 88 of file number.h.

◆ num_acsch

#define num_acsch (   ret,
 
)
Value:
do { \
mpfr_pow_si((n), (n), -1, GMP_RNDN); \
mpfr_asinh((ret), (n), GMP_RNDN); \
} while (0)

Definition at line 96 of file number.h.

◆ num_add

#define num_add (   ret,
  n1,
  n2 
)    mpfr_add((ret), (n1), (n2), GMP_RNDN)

Definition at line 48 of file number.h.

◆ num_add_ui

#define num_add_ui (   ret,
  n,
  ui 
)    mpfr_add_ui((ret), (n), (ui), GMP_RNDN)

Definition at line 50 of file number.h.

◆ num_asech

#define num_asech (   ret,
 
)
Value:
do { \
mpfr_pow_si((n), (n), -1, GMP_RNDN); \
mpfr_acosh((ret), (n), GMP_RNDN); \
} while (0)

Definition at line 92 of file number.h.

◆ num_asin

#define num_asin (   ret,
 
)    mpfr_asin((ret), (n), GMP_RNDN)

Definition at line 79 of file number.h.

◆ num_asinh

#define num_asinh (   ret,
 
)    mpfr_asinh((ret), (n), GMP_RNDN)

Definition at line 85 of file number.h.

◆ num_atan

#define num_atan (   ret,
 
)    mpfr_atan((ret), (n), GMP_RNDN)

Definition at line 81 of file number.h.

◆ num_atanh

#define num_atanh (   ret,
 
)    mpfr_atanh((ret), (n), GMP_RNDN)

Definition at line 87 of file number.h.

◆ num_band

#define num_band (   ret,
  n1,
  n2 
)
Value:
do { \
mpz_t intfirst, intsecond, intoutput; \
mpz_init(intfirst); \
mpz_init(intsecond); \
mpz_init(intoutput); \
mpfr_get_z(intfirst, (n1), GMP_RNDZ); \
mpfr_get_z(intsecond, (n2), GMP_RNDZ); \
mpz_and(intoutput, intfirst, intsecond); \
mpfr_set_z((ret), intoutput, GMP_RNDN); \
mpz_clear(intfirst); \
mpz_clear(intsecond); \
mpz_clear(intoutput); \
} while (0)

Definition at line 187 of file number.h.

◆ num_bnot

#define num_bnot (   ret,
 
)    mpfr_set_ui((ret), ~mpfr_get_ui((n), GMP_RNDN), GMP_RNDN)

Definition at line 229 of file number.h.

◆ num_bor

#define num_bor (   ret,
  n1,
  n2 
)
Value:
do { \
mpz_t intfirst, intsecond, intoutput; \
mpz_init(intfirst); \
mpz_init(intsecond); \
mpz_init(intoutput); \
mpfr_get_z(intfirst, (n1), GMP_RNDZ); \
mpfr_get_z(intsecond, (n2), GMP_RNDZ); \
mpz_ior(intoutput, intfirst, intsecond); \
mpfr_set_z((ret), intoutput, GMP_RNDN); \
mpz_clear(intfirst); \
mpz_clear(intsecond); \
mpz_clear(intoutput); \
} while (0)

Definition at line 174 of file number.h.

◆ num_bxor

#define num_bxor (   ret,
  n1,
  n2 
)
Value:
do { \
mpz_t intfirst, intsecond, intoutput; \
mpz_init(intfirst); \
mpz_init(intsecond); \
mpz_init(intoutput); \
mpfr_get_z(intfirst, (n1), GMP_RNDZ); \
mpfr_get_z(intsecond, (n2), GMP_RNDZ); \
mpz_xor(intoutput, intfirst, intsecond); \
mpfr_set_z((ret), intoutput, GMP_RNDN); \
mpz_clear(intfirst); \
mpz_clear(intsecond); \
mpz_clear(intoutput); \
} while (0)

Definition at line 200 of file number.h.

◆ num_cbrt

#define num_cbrt (   ret,
 
)    mpfr_cbrt((ret), (n), GMP_RNDN)

Definition at line 58 of file number.h.

◆ num_ceil

#define num_ceil (   ret,
 
)    mpfr_ceil((ret), (n))

Definition at line 66 of file number.h.

◆ num_cmp_si

#define num_cmp_si (   n,
  si 
)    mpfr_cmp_si((n), (si))

Definition at line 129 of file number.h.

◆ num_comp

#define num_comp (   ret,
 
)
Value:
do { \
mpz_t integer, intoutput; \
mpz_init(integer); \
mpz_init(intoutput); \
mpfr_get_z(integer, (n), GMP_RNDZ); \
mpz_com(intoutput, integer); \
mpfr_set_z((ret), intoutput, GMP_RNDN); \
mpz_clear(integer); \
mpz_clear(intoutput); \
} while (0)

Definition at line 214 of file number.h.

◆ num_const_catalan

#define num_const_catalan (   n)    num_set_str((n), W_CATALAN, 0)

Definition at line 147 of file number.h.

◆ num_const_euler

#define num_const_euler (   n)    mpfr_const_euler((n), GMP_RNDN)

Definition at line 114 of file number.h.

◆ num_const_pi

#define num_const_pi (   n)    mpfr_const_pi((n), GMP_RNDN)

Definition at line 113 of file number.h.

◆ num_cos

#define num_cos (   ret,
 
)    mpfr_cos((ret), (n), GMP_RNDN)

Definition at line 77 of file number.h.

◆ num_cosh

#define num_cosh (   ret,
 
)    mpfr_cosh((ret), (n), GMP_RNDN)

Definition at line 83 of file number.h.

◆ num_cot

#define num_cot (   ret,
 
)
Value:
do { \
mpfr_tan((ret), (n), GMP_RNDN); \
mpfr_pow_si((ret), (n), -1, GMP_RNDN); \
} while (0)

Definition at line 148 of file number.h.

◆ num_coth

#define num_coth (   ret,
 
)
Value:
do { \
mpfr_tanh((ret), (n), GMP_RNDN); \
mpfr_pow_si((ret), (n), -1, GMP_RNDN); \
} while (0)

Definition at line 160 of file number.h.

◆ num_csc

#define num_csc (   ret,
 
)
Value:
do { \
mpfr_sin((ret), (n), GMP_RNDN); \
mpfr_pow_si((ret), (n), -1, GMP_RNDN); \
} while (0)

Definition at line 156 of file number.h.

◆ num_csch

#define num_csch (   ret,
 
)
Value:
do { \
mpfr_sinh((ret), (n), GMP_RNDN); \
mpfr_pow_si((ret), (n), -1, GMP_RNDN); \
} while (0)

Definition at line 168 of file number.h.

◆ num_div

#define num_div (   ret,
  n1,
  n2 
)    mpfr_div((ret), (n1), (n2), GMP_RNDN)

Definition at line 60 of file number.h.

◆ num_div_ui

#define num_div_ui (   ret,
  n,
  ui 
)    mpfr_div_ui((ret), (n), (ui), GMP_RNDN)

Definition at line 61 of file number.h.

◆ num_exp

#define num_exp (   ret,
 
)    mpfr_exp((ret), (n), GMP_RNDN)

Definition at line 70 of file number.h.

◆ num_factorial

#define num_factorial (   ret,
  op 
)    mpfr_fac_ui((ret), (op), GMP_RNDN)

Definition at line 71 of file number.h.

◆ num_floor

#define num_floor (   ret,
 
)    mpfr_floor((ret), (n))

Definition at line 65 of file number.h.

◆ num_free

#define num_free (   n)    mpfr_clear(n)

Definition at line 33 of file number.h.

◆ num_free_str

#define num_free_str (   a)    mpfr_free_str(a)

Definition at line 39 of file number.h.

◆ num_get_d

#define num_get_d (   n)    mpfr_get_d((n), GMP_RNDN)

Definition at line 36 of file number.h.

◆ num_get_default_prec

#define num_get_default_prec ( )    mpfr_get_default_prec()

Definition at line 132 of file number.h.

◆ num_get_str

#define num_get_str (   a,
  b,
  c,
  d,
  e 
)    mpfr_get_str(a, b, c, d, e, GMP_RNDN)

Definition at line 38 of file number.h.

◆ num_get_ui

#define num_get_ui (   n)    mpfr_get_ui((n), GMP_RNDN)

Definition at line 37 of file number.h.

◆ num_init

#define num_init (   n)    mpfr_init(n)

Definition at line 27 of file number.h.

◆ num_init_set

#define num_init_set (   n1,
  n2 
)    mpfr_init_set((n1), (n2), GMP_RNDN)

Definition at line 28 of file number.h.

◆ num_init_set_d

#define num_init_set_d (   n,
 
)    mpfr_init_set_d((n), (d), GMP_RNDN)

Definition at line 29 of file number.h.

◆ num_init_set_str

#define num_init_set_str (   n,
  str,
  base 
)    mpfr_init_set_str((n), (str), (base), GMP_RNDN)

Definition at line 31 of file number.h.

◆ num_init_set_ui

#define num_init_set_ui (   n,
  ui 
)    mpfr_init_set_ui((n), (ui), GMP_RNDN)

Definition at line 30 of file number.h.

◆ num_is_equal

#define num_is_equal (   n1,
  n2 
)    mpfr_equal_p((n1), (n2))

Definition at line 120 of file number.h.

◆ num_is_greater

#define num_is_greater (   n1,
  n2 
)    mpfr_greater_p((n1), (n2))

Definition at line 121 of file number.h.

◆ num_is_greaterequal

#define num_is_greaterequal (   n1,
  n2 
)    mpfr_greaterequal_p((n1), (n2))

Definition at line 122 of file number.h.

◆ num_is_inf

#define num_is_inf (   n)    mpfr_inf_p(n)

Definition at line 118 of file number.h.

◆ num_is_less

#define num_is_less (   n1,
  n2 
)    mpfr_less_p((n1), (n2))

Definition at line 123 of file number.h.

◆ num_is_lessequal

#define num_is_lessequal (   n1,
  n2 
)    mpfr_lessequal_p((n1), (n2))

Definition at line 124 of file number.h.

◆ num_is_nan

#define num_is_nan (   n)    mpfr_nan_p(n)

Definition at line 117 of file number.h.

◆ num_is_zero

#define num_is_zero (   n)    mpfr_zero_p(n)

Definition at line 119 of file number.h.

◆ num_log

#define num_log (   ret,
 
)    mpfr_log((ret), (n), GMP_RNDN)

Definition at line 74 of file number.h.

◆ num_log10

#define num_log10 (   ret,
 
)    mpfr_log10((ret), (n), GMP_RNDN)

Definition at line 72 of file number.h.

◆ num_log2

#define num_log2 (   ret,
 
)    mpfr_log2((ret), (n), GMP_RNDN)

Definition at line 73 of file number.h.

◆ num_mul

#define num_mul (   ret,
  n1,
  n2 
)    mpfr_mul((ret), (n1), (n2), GMP_RNDN)

Definition at line 53 of file number.h.

◆ num_mul_si

#define num_mul_si (   ret,
  n,
  si 
)    mpfr_mul_si((ret), (n), (si), GMP_RNDN)

Definition at line 54 of file number.h.

◆ num_mul_ui

#define num_mul_ui (   ret,
  n,
  ui 
)    mpfr_mul_ui((ret), (n), (ui), GMP_RNDN)

Definition at line 55 of file number.h.

◆ num_neg

#define num_neg (   ret,
 
)    mpfr_neg((ret), (n), GMP_RNDN)

Definition at line 126 of file number.h.

◆ num_out_str

#define num_out_str (   fd,
  base,
 
)    mpfr_out_str((fd), (base), 0, (n), GMP_RNDN)

Definition at line 116 of file number.h.

◆ num_pow

#define num_pow (   ret,
  n,
  exp 
)    mpfr_pow((ret), (n), (exp), GMP_RNDN)

Definition at line 68 of file number.h.

◆ num_pow_si

#define num_pow_si (   ret,
  n,
  exp 
)    mpfr_pow_si((ret), (n), (exp), GMP_RNDN)

Definition at line 69 of file number.h.

◆ NUM_PREC_MAX

#define NUM_PREC_MAX   MPFR_PREC_MAX

Definition at line 25 of file number.h.

◆ NUM_PREC_MIN

#define NUM_PREC_MIN   MPFR_PREC_MIN

Definition at line 24 of file number.h.

◆ num_random

#define num_random (   n)    mpfr_urandomb((n), randstate)

Definition at line 102 of file number.h.

◆ num_rint

#define num_rint (   ret,
 
)    mpfr_rint((ret), (n), GMP_RNDN)

Definition at line 63 of file number.h.

◆ num_rintz

#define num_rintz (   ret,
 
)    mpfr_rint((ret), (n), GMP_RNDZ)

Definition at line 64 of file number.h.

◆ num_sec

#define num_sec (   ret,
 
)
Value:
do { \
mpfr_cos((ret), (n), GMP_RNDN); \
mpfr_pow_si((ret), (n), -1, GMP_RNDN); \
} while (0)

Definition at line 152 of file number.h.

◆ num_sech

#define num_sech (   ret,
 
)
Value:
do { \
mpfr_cosh((ret), (n), GMP_RNDN); \
mpfr_pow_si((ret), (n), -1, GMP_RNDN); \
} while (0)

Definition at line 164 of file number.h.

◆ num_set

#define num_set (   n1,
  n2 
)    mpfr_set((n1), (n2), GMP_RNDN)

Definition at line 41 of file number.h.

◆ num_set_d

#define num_set_d (   n,
 
)    mpfr_set_d((n), (d), GMP_RNDN)

Definition at line 42 of file number.h.

◆ num_set_default_prec

#define num_set_default_prec (   prec)    mpfr_set_default_prec(prec)

Definition at line 133 of file number.h.

◆ num_set_inf

#define num_set_inf (   n,
 
)    mpfr_set_inf(n, s)

Definition at line 46 of file number.h.

◆ num_set_nan

#define num_set_nan (   n)    mpfr_set_nan(n)

Definition at line 45 of file number.h.

◆ num_set_str

#define num_set_str (   n,
  str,
  base 
)    mpfr_set_str((n), (str), (base), GMP_RNDN)

Definition at line 44 of file number.h.

◆ num_set_ui

#define num_set_ui (   n,
  ui 
)    mpfr_set_ui((n), (ui), GMP_RNDN)

Definition at line 43 of file number.h.

◆ num_sign

#define num_sign (   n)    mpfr_sgn(n)

Definition at line 125 of file number.h.

◆ num_sin

#define num_sin (   ret,
 
)    mpfr_sin((ret), (n), GMP_RNDN)

Definition at line 76 of file number.h.

◆ num_sinc

#define num_sinc (   ret,
 
)
Value:
do { \
if(mpfr_zero_p((n))) { \
mpfr_set_ui((ret), 1, GMP_RNDN); \
} else { \
mpfr_sin((ret), (n), GMP_RNDN); \
mpfr_div((ret), (ret), (n), GMP_RNDN); \
} \
} while (0)

Definition at line 104 of file number.h.

◆ num_sinh

#define num_sinh (   ret,
 
)    mpfr_sinh((ret), (n), GMP_RNDN)

Definition at line 82 of file number.h.

◆ num_sqr

#define num_sqr (   ret,
 
)    mpfr_sqr((ret), (n), GMP_RNDN)

Definition at line 56 of file number.h.

◆ num_sqrt

#define num_sqrt (   ret,
 
)    mpfr_sqrt((ret), (n), GMP_RNDN)

Definition at line 57 of file number.h.

◆ num_sub

#define num_sub (   ret,
  n1,
  n2 
)    mpfr_sub((ret), (n1), (n2), GMP_RNDN)

Definition at line 49 of file number.h.

◆ num_sub_ui

#define num_sub_ui (   ret,
  n,
  ui 
)    mpfr_sub_ui((ret), (n), (ui), GMP_RNDN)

Definition at line 51 of file number.h.

◆ num_tan

#define num_tan (   ret,
 
)    mpfr_tan((ret), (n), GMP_RNDN)

Definition at line 78 of file number.h.

◆ num_tanh

#define num_tanh (   ret,
 
)    mpfr_tanh((ret), (n), GMP_RNDN)

Definition at line 84 of file number.h.

◆ num_trunc

#define num_trunc (   ret,
 
)    mpfr_trunc((ret), (n))

Definition at line 213 of file number.h.

◆ num_zeta

#define num_zeta (   ret,
 
)    mpfr_zeta((ret), (n), GMP_RNDN);

Definition at line 103 of file number.h.

◆ Number

#define Number   mpfr_t

Definition at line 23 of file number.h.

Typedef Documentation

◆ num_exp_t

typedef mp_exp_t num_exp_t

Definition at line 35 of file number.h.

◆ num_prec_t

typedef mp_prec_t num_prec_t

Definition at line 131 of file number.h.

Function Documentation

◆ init_numbers()

void init_numbers ( void  )

Definition at line 26 of file number.c.

References numbers_cleanup(), and randstate.

Referenced by main().

◆ is_int()

int is_int ( const  mpfr_t)

Referenced by print_this_result(), and simple_exp().

Variable Documentation

◆ randstate

gmp_randstate_t randstate

Referenced by init_numbers().