Back to index

plt-scheme  4.2.1
Defines
nummacs.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define NEED_NUMBER(name)   scheme_wrong_type(#name, "number", 0, argc, argv)
#define NEED_REAL(name)   scheme_wrong_type(#name, REAL_NUMBER_STR, 0, argc, argv)
#define NEED_INTEGER(name)   scheme_wrong_type(#name, "integer", 0, argc, argv)
#define rat_from_float(d, sr)   force_rat(scheme_rational_from_float(d), sr)
#define rat_from_double(d, sr)   force_rat(scheme_rational_from_double(d), sr)
#define FLOATWRAP(x)   /* empty */
#define D_FLOATWRAP(x)   x
#define S_FLOATWRAP(x)   /* empty */
#define GEN_BIN_COMP_PROT(name)   static int name (Scheme_Object *n1, Scheme_Object *n2)
#define GEN_NARY_COMP(name, scheme_name, bin_name, TYPEP, type)
#define GEN_BIN_PROT(name)   static Scheme_Object *name (const Scheme_Object *n1, const Scheme_Object *n2)
#define cx_NO_CHECK(n1, n2)   /* empty */
#define GEN_BIN_THING(rettype, name, scheme_name, iop, fop, fsop, bn_op, rop, cxop, wrap, combineinf, waybigf, swaybigf, waysmallf, swaysmallf, waybigs, swaybigs, waysmalls, swaysmalls, combinezero, firstzero, sfirstzero, secondzero, ssecondzero, nanchk, snanchk, nanchk_more, snanchk_more, complexwrap, noniziwrap, exactzerowrapl, exactzerowrapr, numbertype, toi_or_toe, check_exact_zero1, check_exact_one1, check_exact_zero2, check_exact_one2)
#define GR_NAN_CHK(n2)   0
#define GEN_IDENT(x)   x
#define GEN_OMIT(x)
#define GEN_FIRST_ONLY(x, y)   x
#define GEN_APPLY(x, y)   x(y)
#define GEN_APPLY3(x, y, z)   x(y, z)
#define GEN_SCHEME_BOOL_APPLY(x, y, z)   x(y)
#define GEN_TOI(x, y)   x
#define GEN_TOE(x, y)   y
#define GEN_RETURN_0(x)   x return zeroi;
#define GEN_RETURN_0_USUALLY(x)   x if (!SCHEME_FLOATP(n2) || GR_NAN_CHK(n2) || (SCHEME_FLOAT_VAL(n2) != 0)) return zeroi;
#define GEN_RETURN_1(x)   x return scheme_make_integer(1);
#define GEN_RETURN_N1(x)   x return (Scheme_Object *)n1;
#define GEN_RETURN_N2(x)   x return (Scheme_Object *)n2;
#define GEN_SINGLE_SUBTRACT_N2(x)   x if SCHEME_FLOATP(n2) return unary_minus(n2);
#define GEN_SAME_INF(x)   (scheme_is_positive(x) ? scheme_inf_object : scheme_minus_inf_object)
#define GEN_OPP_INF(x)   (!scheme_is_positive(x) ? scheme_inf_object : scheme_minus_inf_object)
#define GEN_MAKE_PZERO(x)   (!scheme_is_positive(x) ? scheme_nzerod : scheme_zerod)
#define GEN_MAKE_NZERO(x)   (!scheme_is_positive(x) ? scheme_zerod : scheme_nzerod)
#define GEN_MAKE_ZERO_Z(x, y)   (scheme_minus_zero_p(y) ? GEN_MAKE_NZERO(x) : GEN_MAKE_PZERO(x))
#define GEN_SAME_INF_Z(x, y)   (scheme_minus_zero_p(y) ? GEN_OPP_INF(x) : GEN_SAME_INF(x))
#define GEN_SAME_SINF(x)   (scheme_is_positive(x) ? scheme_single_inf_object : scheme_single_minus_inf_object)
#define GEN_OPP_SINF(x)   (!scheme_is_positive(x) ? scheme_single_inf_object : scheme_single_minus_inf_object)
#define GEN_MAKE_PSZERO(x)   (!scheme_is_positive(x) ? scheme_nzerof : scheme_zerof)
#define GEN_MAKE_NSZERO(x)   (!scheme_is_positive(x) ? scheme_zerof : scheme_nzerof)
#define GEN_MAKE_SZERO_Z(x, y)   (scheme_minus_zero_p(y) ? GEN_MAKE_NSZERO(x) : GEN_MAKE_PSZERO(x))
#define GEN_SAME_SINF_Z(x, y)   (scheme_minus_zero_p(y) ? GEN_OPP_SINF(x) : GEN_SAME_SINF(x))
#define NO_NAN_CHECK(x)   /* empty */
#define NAN_RETURNS_NAN(x)   if (MZ_IS_NAN(x)) return scheme_nan_object
#define NAN_RETURNS_SNAN(x)   if (MZ_IS_NAN(x)) return scheme_single_nan_object
#define NAN_CHECK_0_IF_WEIRD(x)   /* empty */
#define NAN_CHECK_NAN_IF_WEIRD(x)   /* empty */
#define SNAN_CHECK_NAN_IF_WEIRD(x)   /* empty */
#define NAN_CHECK_0(x)   if (MZ_IS_NAN(x)) return 0
#define GEN_BIN_OP(name, scheme_name, iop, fop, fsop, bn_op, rop, cxop, exzeopl, exzeopr, nanckop, snanckop, c0_1, c1_1, c0_2, c1_2)
#define GEN_BIN_DIV_OP(name, scheme_name, iop, fop, fsop, bn_op, rop, cxop, c0_1, c1_1, c0_2, c1_2)
#define GEN_BIN_COMP(name, scheme_name, iop, fop, bn_op, rop, cxop, waybig, waysmall, firstzero, secondzero, complexwrap, noniziwrap, numbertype)
#define GEN_BIN_INT_OP(name, scheme_name, op, bigop)
#define GEN_NARY_OP(stat, name, scheme_name, bin_name, ident, TYPEP, type, single)
#define GEN_TWOARY_OP(stat, name, scheme_name, bin_name, TYPEP, type)
#define BIGNUMS_AS_DOUBLES(o)   d = scheme_bignum_to_double(o);
#define GEN_UNARY_OP(name, scheme_name, c_name, inf_val, sinf_val, neginf_val, sneginf_val, nan_val, snan_val, complex_fun, PRECHECK, USE_COMPLEX, BIGNUM_MODE)

Define Documentation

#define BIGNUMS_AS_DOUBLES (   o)    d = scheme_bignum_to_double(o);

Definition at line 669 of file nummacs.h.

#define cx_NO_CHECK (   n1,
  n2 
)    /* empty */

Definition at line 100 of file nummacs.h.

#define D_FLOATWRAP (   x)    x

Definition at line 47 of file nummacs.h.

#define FLOATWRAP (   x)    /* empty */

Definition at line 46 of file nummacs.h.

#define GEN_APPLY (   x,
  y 
)    x(y)

Definition at line 492 of file nummacs.h.

#define GEN_APPLY3 (   x,
  y,
 
)    x(y, z)

Definition at line 493 of file nummacs.h.

#define GEN_BIN_COMP (   name,
  scheme_name,
  iop,
  fop,
  bn_op,
  rop,
  cxop,
  waybig,
  waysmall,
  firstzero,
  secondzero,
  complexwrap,
  noniziwrap,
  numbertype 
)
Value:
GEN_BIN_THING(int, name, scheme_name, \
               iop, fop, fop, bn_op, rop, cxop, \
               GEN_IDENT, GEN_FIRST_ONLY, \
               waybig, waybig, waysmall, waysmall, \
               waybig, waybig, waysmall, waysmall, \
               GEN_SCHEME_BOOL_APPLY, firstzero, firstzero, secondzero, secondzero, \
               NAN_CHECK_0_IF_WEIRD, NAN_CHECK_0_IF_WEIRD, NAN_CHECK_0, NAN_CHECK_0, \
               complexwrap, noniziwrap, GEN_OMIT, GEN_OMIT, numbertype, GEN_TOE, \
               cx_NO_CHECK, cx_NO_CHECK, cx_NO_CHECK, cx_NO_CHECK)

Definition at line 557 of file nummacs.h.

#define GEN_BIN_COMP_PROT (   name)    static int name (Scheme_Object *n1, Scheme_Object *n2)

Definition at line 51 of file nummacs.h.

#define GEN_BIN_DIV_OP (   name,
  scheme_name,
  iop,
  fop,
  fsop,
  bn_op,
  rop,
  cxop,
  c0_1,
  c1_1,
  c0_2,
  c1_2 
)
#define GEN_BIN_INT_OP (   name,
  scheme_name,
  op,
  bigop 
)

Definition at line 568 of file nummacs.h.

#define GEN_BIN_OP (   name,
  scheme_name,
  iop,
  fop,
  fsop,
  bn_op,
  rop,
  cxop,
  exzeopl,
  exzeopr,
  nanckop,
  snanckop,
  c0_1,
  c1_1,
  c0_2,
  c1_2 
)
Value:
GEN_BIN_THING(Scheme_Object *, name, scheme_name, \
                iop, fop, fsop, bn_op, rop, cxop, \
                GEN_OMIT, GEN_FIRST_ONLY, \
                0, 0, 0, 0, \
                0, 0, 0, 0, \
                GEN_SCHEME_BOOL_APPLY, badfunc, badfunc, badfunc, badfunc, \
                nanckop, snanckop, nanckop, snanckop, \
                GEN_IDENT, GEN_IDENT, exzeopl, exzeopr, "number", GEN_TOI, \
                c0_1, c1_1, c0_2, c1_2)

Definition at line 535 of file nummacs.h.

#define GEN_BIN_PROT (   name)    static Scheme_Object *name (const Scheme_Object *n1, const Scheme_Object *n2)

Definition at line 97 of file nummacs.h.

#define GEN_BIN_THING (   rettype,
  name,
  scheme_name,
  iop,
  fop,
  fsop,
  bn_op,
  rop,
  cxop,
  wrap,
  combineinf,
  waybigf,
  swaybigf,
  waysmallf,
  swaysmallf,
  waybigs,
  swaybigs,
  waysmalls,
  swaysmalls,
  combinezero,
  firstzero,
  sfirstzero,
  secondzero,
  ssecondzero,
  nanchk,
  snanchk,
  nanchk_more,
  snanchk_more,
  complexwrap,
  noniziwrap,
  exactzerowrapl,
  exactzerowrapr,
  numbertype,
  toi_or_toe,
  check_exact_zero1,
  check_exact_one1,
  check_exact_zero2,
  check_exact_one2 
)

Definition at line 103 of file nummacs.h.

#define GEN_FIRST_ONLY (   x,
  y 
)    x

Definition at line 491 of file nummacs.h.

#define GEN_IDENT (   x)    x

Definition at line 489 of file nummacs.h.

#define GEN_MAKE_NSZERO (   x)    (!scheme_is_positive(x) ? scheme_zerof : scheme_nzerof)

Definition at line 515 of file nummacs.h.

Definition at line 508 of file nummacs.h.

#define GEN_MAKE_PSZERO (   x)    (!scheme_is_positive(x) ? scheme_nzerof : scheme_zerof)

Definition at line 514 of file nummacs.h.

Definition at line 507 of file nummacs.h.

Definition at line 516 of file nummacs.h.

#define GEN_MAKE_ZERO_Z (   x,
  y 
)    (scheme_minus_zero_p(y) ? GEN_MAKE_NZERO(x) : GEN_MAKE_PZERO(x))

Definition at line 509 of file nummacs.h.

#define GEN_NARY_COMP (   name,
  scheme_name,
  bin_name,
  TYPEP,
  type 
)

Definition at line 54 of file nummacs.h.

#define GEN_NARY_OP (   stat,
  name,
  scheme_name,
  bin_name,
  ident,
  TYPEP,
  type,
  single 
)
Value:
stat Scheme_Object *name (int argc, Scheme_Object *argv[]); \
static MZ_INLINE Scheme_Object * \
name ## __slow (Scheme_Object *ret, int argc, Scheme_Object *argv[])  \
{ \
  int i; \
  for (i = 1 ; i<argc ; ++i ) { \
    Scheme_Object *o; \
    o = argv[i]; \
    if (!TYPEP(o)) { scheme_wrong_type(scheme_name, type, i, argc, argv); return NULL; } \
    ret = bin_name (ret, o); \
  } \
  return (ret); \
}\
Scheme_Object * \
name (int argc, Scheme_Object *argv[]) \
{ \
  Scheme_Object *ret;                          \
  if (!argc) return scheme_make_integer(ident); \
  ret = argv[0]; \
  if (!TYPEP(ret)) { scheme_wrong_type(scheme_name, type, 0, argc, argv); return NULL; } \
  if (argc == 2) { \
    Scheme_Object *b; \
    b = argv[1]; \
    if (!TYPEP(b)) { scheme_wrong_type(scheme_name, type, 1, argc, argv); return NULL; } \
    return bin_name(ret, b); \
  } \
  if (argc == 1) { return single(ret); } \
  return name ## __slow(ret, argc, argv); \
}

Definition at line 610 of file nummacs.h.

#define GEN_OMIT (   x)

Definition at line 490 of file nummacs.h.

Definition at line 506 of file nummacs.h.

#define GEN_OPP_SINF (   x)    (!scheme_is_positive(x) ? scheme_single_inf_object : scheme_single_minus_inf_object)

Definition at line 513 of file nummacs.h.

#define GEN_RETURN_0 (   x)    x return zeroi;

Definition at line 498 of file nummacs.h.

#define GEN_RETURN_0_USUALLY (   x)    x if (!SCHEME_FLOATP(n2) || GR_NAN_CHK(n2) || (SCHEME_FLOAT_VAL(n2) != 0)) return zeroi;

Definition at line 499 of file nummacs.h.

#define GEN_RETURN_1 (   x)    x return scheme_make_integer(1);

Definition at line 500 of file nummacs.h.

#define GEN_RETURN_N1 (   x)    x return (Scheme_Object *)n1;

Definition at line 501 of file nummacs.h.

#define GEN_RETURN_N2 (   x)    x return (Scheme_Object *)n2;

Definition at line 502 of file nummacs.h.

Definition at line 505 of file nummacs.h.

#define GEN_SAME_INF_Z (   x,
  y 
)    (scheme_minus_zero_p(y) ? GEN_OPP_INF(x) : GEN_SAME_INF(x))

Definition at line 510 of file nummacs.h.

#define GEN_SAME_SINF (   x)    (scheme_is_positive(x) ? scheme_single_inf_object : scheme_single_minus_inf_object)

Definition at line 512 of file nummacs.h.

#define GEN_SAME_SINF_Z (   x,
  y 
)    (scheme_minus_zero_p(y) ? GEN_OPP_SINF(x) : GEN_SAME_SINF(x))

Definition at line 517 of file nummacs.h.

#define GEN_SCHEME_BOOL_APPLY (   x,
  y,
 
)    x(y)

Definition at line 494 of file nummacs.h.

Definition at line 503 of file nummacs.h.

#define GEN_TOE (   x,
  y 
)    y

Definition at line 496 of file nummacs.h.

#define GEN_TOI (   x,
  y 
)    x

Definition at line 495 of file nummacs.h.

#define GEN_TWOARY_OP (   stat,
  name,
  scheme_name,
  bin_name,
  TYPEP,
  type 
)
Value:
stat Scheme_Object * name (int argc, Scheme_Object *argv[]); \
static MZ_INLINE Scheme_Object * \
name ## __slow (Scheme_Object *ret, int argc, Scheme_Object *argv[]) \
{\
  int i; \
  for ( i=1 ; i<argc ; ++i ) { \
    if (!TYPEP(argv[i])) \
      scheme_wrong_type(scheme_name, type, i, argc, argv); \
    ret = bin_name (ret, argv[i]); \
  } \
  return ret; \
}\
Scheme_Object * \
name (int argc, Scheme_Object *argv[]) \
{ \
  Scheme_Object *ret = argv[0]; \
  if (!TYPEP(ret)) \
    scheme_wrong_type(scheme_name, type, 0, argc, argv); \
  if (argc == 1) return ret; \
  if (argc == 2) { \
    if (!TYPEP(argv[1])) \
      scheme_wrong_type(scheme_name, type, 1, argc, argv); \
    return bin_name(ret, argv[1]); \
  } \
  return name ## __slow(ret, argc, argv); \
}

Definition at line 641 of file nummacs.h.

#define GEN_UNARY_OP (   name,
  scheme_name,
  c_name,
  inf_val,
  sinf_val,
  neginf_val,
  sneginf_val,
  nan_val,
  snan_val,
  complex_fun,
  PRECHECK,
  USE_COMPLEX,
  BIGNUM_MODE 
)

Definition at line 671 of file nummacs.h.

#define GR_NAN_CHK (   n2)    0

Definition at line 486 of file nummacs.h.

#define NAN_CHECK_0 (   x)    if (MZ_IS_NAN(x)) return 0

Definition at line 533 of file nummacs.h.

#define NAN_CHECK_0_IF_WEIRD (   x)    /* empty */

Definition at line 528 of file nummacs.h.

#define NAN_CHECK_NAN_IF_WEIRD (   x)    /* empty */

Definition at line 529 of file nummacs.h.

Definition at line 520 of file nummacs.h.

#define NAN_RETURNS_SNAN (   x)    if (MZ_IS_NAN(x)) return scheme_single_nan_object

Definition at line 521 of file nummacs.h.

#define NEED_INTEGER (   name)    scheme_wrong_type(#name, "integer", 0, argc, argv)

Definition at line 30 of file nummacs.h.

#define NEED_NUMBER (   name)    scheme_wrong_type(#name, "number", 0, argc, argv)

Definition at line 26 of file nummacs.h.

#define NEED_REAL (   name)    scheme_wrong_type(#name, REAL_NUMBER_STR, 0, argc, argv)

Definition at line 28 of file nummacs.h.

#define NO_NAN_CHECK (   x)    /* empty */

Definition at line 519 of file nummacs.h.

#define rat_from_double (   d,
  sr 
)    force_rat(scheme_rational_from_double(d), sr)

Definition at line 34 of file nummacs.h.

#define rat_from_float (   d,
  sr 
)    force_rat(scheme_rational_from_float(d), sr)

Definition at line 33 of file nummacs.h.

#define S_FLOATWRAP (   x)    /* empty */

Definition at line 48 of file nummacs.h.

#define SNAN_CHECK_NAN_IF_WEIRD (   x)    /* empty */

Definition at line 530 of file nummacs.h.