polylib 5.22.8
arithmetique.h File Reference
#include <limits.h>
#include <stdio.h>
#include "arithmetic_errors.h"

Go to the source code of this file.

Macros

#define __LONG_LONG_MAX__   9223372036854775807LL
 package arithmetique More...
 
#define LONG_LONG_MAX   __LONG_LONG_MAX__
 
#define LONG_LONG_MIN   (-LONG_LONG_MAX - 1)
 
#define ULONG_LONG_MAX   (LONG_LONG_MAX * 2ULL + 1)
 
#define value_init(val)   ((val) = 0)
 
#define value_assign(v1, v2)   ((v1) = (v2))
 
#define value_set_si(val, i)   ((val) = (Value)(i))
 
#define value_set_double(val, d)   ((val) = (Value)(d))
 
#define value_clear(val)   ((val) = 0)
 
#define value_read(val, str)   (sscanf((str), VALUE_FMT, &(val)))
 
#define value_print(Dst, fmt, val)   (fprintf((Dst), (fmt), (val)))
 
#define value_swap(v1, v2)
 
#define int_to_value(i)   ((Value)(i))
 
#define long_to_value(l)   ((Value)(l))
 
#define float_to_value(f)   ((Value)(f))
 
#define double_to_value(d)   ((Value)(d))
 
#define value_eq(v1, v2)   ((v1) == (v2))
 
#define value_ne(v1, v2)   ((v1) != (v2))
 
#define value_gt(v1, v2)   ((v1) > (v2))
 
#define value_ge(v1, v2)   ((v1) >= (v2))
 
#define value_lt(v1, v2)   ((v1) < (v2))
 
#define value_le(v1, v2)   ((v1) <= (v2))
 
#define value_abs_eq(v1, v2)   (value_abs(v1) == value_abs(v2))
 
#define value_abs_ne(v1, v2)   (value_abs(v1) != value_abs(v2))
 
#define value_abs_gt(v1, v2)   (value_abs(v1) > value_abs(v2))
 
#define value_abs_ge(v1, v2)   (value_abs(v1) >= value_abs(v2))
 
#define value_abs_lt(v1, v2)   (value_abs(v1) < value_abs(v2))
 
#define value_abs_le(v1, v2)   (value_abs(v1) <= value_abs(v2))
 
#define value_sign(v)    (value_eq(v, VALUE_ZERO) ? 0 : value_lt(v, VALUE_ZERO) ? -1 : 1)
 
#define value_cmp(v1, v2)   (value_eq(v1, v2) ? 0 : value_lt(v1, v2) ? -1 : 1)
 
#define value_plus(v1, v2)   ((v1) + (v2))
 
#define value_div(v1, v2)   ((v1) / (v2))
 
#define value_mod(v1, v2)   ((v1) % (v2))
 
#define value_direct_multiply(v1, v2)   ((v1) * (v2)) /* direct! */
 
#define value_minus(v1, v2)   ((v1) - (v2))
 
#define value_pdiv(v1, v2)   (DIVIDE((v1), (v2)))
 
#define value_pmod(v1, v2)   (MODULO((v1), (v2)))
 
#define value_min(v1, v2)   (value_le((v1), (v2)) ? (v1) : (v2))
 
#define value_max(v1, v2)   (value_ge((v1), (v2)) ? (v1) : (v2))
 
#define value_or(v1, v2)   ((v1) | (v2))
 
#define value_and(v1, v2)   ((v1) & (v2))
 
#define value_lshift(v1, v2)   ((v1) << (v2))
 
#define value_rshift(v1, v2)   ((v1) >> (v2))
 
#define value_addto(ref, val1, val2)   ((ref) = (val1) + (val2))
 
#define value_add_int(ref, val, vint)   ((ref) = (val) + (Value)(vint))
 
#define value_addmul(ref, val1, val2)   ((ref) += (val1) * (val2))
 
#define value_increment(ref, val)   ((ref) = (val) + VALUE_ONE)
 
#define value_direct_product(ref, val1, val2)    ((ref) = (val1) * (val2)) /* direct! */
 
#define value_multiply(ref, val1, val2)   ((ref) = value_mult((val1), (val2)))
 
#define value_subtract(ref, val1, val2)   ((ref) = (val1) - (val2))
 
#define value_sub_int(ref, val, vint)   ((ref) = (val) - (Value)(vint))
 
#define value_decrement(ref, val)   ((ref) = (val) - VALUE_ONE)
 
#define value_division(ref, val1, val2)   ((ref) = (val1) / (val2))
 
#define value_divexact(ref, val1, val2)   ((ref) = (val1) / (val2))
 
#define value_modulus(ref, val1, val2)   ((ref) = (val1) % (val2))
 
#define value_pdivision(ref, val1, val2)   ((ref) = value_pdiv((val1), (val2)))
 
#define value_pmodulus(ref, val1, val2)   ((ref) = value_pmod((val1), (val2)))
 
#define value_oppose(ref, val)   ((ref) = value_uminus((val)))
 
#define value_absolute(ref, val)   ((ref) = value_abs((val)))
 
#define value_minimum(ref, val1, val2)   ((ref) = value_min((val1), (val2)))
 
#define value_maximum(ref, val1, val2)   ((ref) = value_max((val1), (val2)))
 
#define value_gcd(ref, val1, val2)   Gcd((val1), (val2), &(ref))
 
#define value_lcm(ref, val1, val2)   Lcm3((val1), (val2), &(ref))
 
#define value_orto(ref, val1, val2)   ((ref) = (val1) | (val2))
 
#define value_andto(ref, val1, val2)   ((ref) = (val1) & (val2))
 
#define value_uminus(val)   (-(val))
 
#define value_not(val)   (~(val))
 
#define value_abs(val)
 
#define value_pos_p(val)   value_gt(val, VALUE_ZERO)
 
#define value_neg_p(val)   value_lt(val, VALUE_ZERO)
 
#define value_posz_p(val)   value_ge(val, VALUE_ZERO)
 
#define value_negz_p(val)   value_le(val, VALUE_ZERO)
 
#define value_zero_p(val)   value_eq(val, VALUE_ZERO)
 
#define value_notzero_p(val)   value_ne(val, VALUE_ZERO)
 
#define value_one_p(val)   value_eq(val, VALUE_ONE)
 
#define value_notone_p(val)   value_ne(val, VALUE_ONE)
 
#define value_mone_p(val)   value_eq(val, VALUE_MONE)
 
#define value_notmone_p(val)   value_ne(val, VALUE_MONE)
 
#define value_cmp_si(val, n)   (val - (n))
 
#define value_min_p(val)   value_eq(val, VALUE_MIN)
 
#define value_max_p(val)   value_eq(val, VALUE_MAX)
 
#define value_notmin_p(val)   value_ne(val, VALUE_MIN)
 
#define value_notmax_p(val)   value_ne(val, VALUE_MAX)
 
#define value_protected_hard_idiv_multiply(v, w, throw)
 
#define value_protected_multiply(v, w, throw)    value_protected_hard_idiv_multiply(v, w, throw)
 
#define value_protected_mult(v, w)    value_protected_multiply(v, w, THROW(overflow_error))
 
#define value_protected_product(v, w)   v = value_protected_mult(v, w)
 
#define value_mult(v, w)
 
#define value_product(v, w)   v = value_mult(v, w)
 
#define value_substract(ref, val1, val2)   (value_subtract((ref), (val1), (val2)))
 
#define ABS(x)   (((x) >= 0) ? (x) : -(x))
 
#define MIN(x, y)   (((x) >= (y)) ? (y) : (x))
 
#define MAX(x, y)   (((x) >= (y)) ? (x) : (y))
 
#define SIGN(x)   (((x) > 0) ? 1 : ((x) == 0 ? 0 : -1))
 
#define DIVIDE(x, y)    ((y) > 0 ? POSITIVE_DIVIDE(x, y) : -POSITIVE_DIVIDE((x), (-(y))))
 
#define POSITIVE_DIVIDE(x, y)   ((x) > 0 ? (x) / (y) : -(-(x) + (y) - 1) / (y))
 
#define MODULO(x, y)   ((y) > 0 ? POSITIVE_MODULO(x, y) : POSITIVE_MODULO(-x, -y))
 
#define POSITIVE_MODULO(x, y)    ((x) > 0 ? (x) % (y) : ((x) % (y) == 0 ? 0 : ((y) - (-(x)) % (y))))
 

Functions

void dump_exception_stack_to_file (FILE *)
 
void dump_exception_stack (void)
 
jmp_buf * push_exception_on_stack (int, const char *, const char *, int)
 
void pop_exception_from_stack (int, const char *, const char *, int)
 
void throw_exception (int, const char *, const char *, int)
 
void free_exception_stack (void)
 

Variables

unsigned int overflow_error
 
unsigned int simplex_arithmetic_error
 
unsigned int user_exception_error
 
unsigned int parser_exception_error
 
unsigned int any_exception_error
 
unsigned int the_last_just_thrown_exception
 

Macro Definition Documentation

◆ __LONG_LONG_MAX__

#define __LONG_LONG_MAX__   9223372036854775807LL

package arithmetique

Id
arithmetique.h,v 1.24 2007/02/22 09:16:57 skimo Exp

Francois Irigoin, mai 1989

Modifications

  • rewrite of DIVIDE which was wrong (Remi Triolet, Francois Irigoin, april 90)
  • simplification of POSITIVE_DIVIDE by suppressing one modulo
  • B.Meister : added addmul, operation existing in gmp and quite useful (05-2005)

Definition at line 80 of file arithmetique.h.

◆ ABS

#define ABS (   x)    (((x) >= 0) ? (x) : -(x))

Definition at line 722 of file arithmetique.h.

◆ DIVIDE

#define DIVIDE (   x,
 
)     ((y) > 0 ? POSITIVE_DIVIDE(x, y) : -POSITIVE_DIVIDE((x), (-(y))))

Definition at line 745 of file arithmetique.h.

◆ double_to_value

#define double_to_value (   d)    ((Value)(d))

Definition at line 499 of file arithmetique.h.

◆ float_to_value

#define float_to_value (   f)    ((Value)(f))

Definition at line 498 of file arithmetique.h.

◆ int_to_value

#define int_to_value (   i)    ((Value)(i))

Definition at line 496 of file arithmetique.h.

◆ LONG_LONG_MAX

#define LONG_LONG_MAX   __LONG_LONG_MAX__

Definition at line 83 of file arithmetique.h.

◆ LONG_LONG_MIN

#define LONG_LONG_MIN   (-LONG_LONG_MAX - 1)

Definition at line 85 of file arithmetique.h.

◆ long_to_value

#define long_to_value (   l)    ((Value)(l))

Definition at line 497 of file arithmetique.h.

◆ MAX

#define MAX (   x,
 
)    (((x) >= (y)) ? (x) : (y))

Definition at line 733 of file arithmetique.h.

◆ MIN

#define MIN (   x,
 
)    (((x) >= (y)) ? (y) : (x))

Definition at line 730 of file arithmetique.h.

◆ MODULO

#define MODULO (   x,
 
)    ((y) > 0 ? POSITIVE_MODULO(x, y) : POSITIVE_MODULO(-x, -y))

Definition at line 752 of file arithmetique.h.

◆ POSITIVE_DIVIDE

#define POSITIVE_DIVIDE (   x,
 
)    ((x) > 0 ? (x) / (y) : -(-(x) + (y) - 1) / (y))

Definition at line 749 of file arithmetique.h.

◆ POSITIVE_MODULO

#define POSITIVE_MODULO (   x,
 
)     ((x) > 0 ? (x) % (y) : ((x) % (y) == 0 ? 0 : ((y) - (-(x)) % (y))))

Definition at line 760 of file arithmetique.h.

◆ SIGN

#define SIGN (   x)    (((x) > 0) ? 1 : ((x) == 0 ? 0 : -1))

Definition at line 737 of file arithmetique.h.

◆ ULONG_LONG_MAX

#define ULONG_LONG_MAX   (LONG_LONG_MAX * 2ULL + 1)

Definition at line 87 of file arithmetique.h.

◆ value_abs

#define value_abs (   val)
Value:
(value_posz_p(val) \
? (val) \
: (value_ne((val), VALUE_NAN) ? value_uminus(val) \
: (THROW(overflow_error), VALUE_NAN)))
#define THROW(what)
#define value_uminus(val)
Definition: arithmetique.h:562
#define value_ne(v1, v2)
Definition: arithmetique.h:503
unsigned int overflow_error
Definition: errors.c:96
#define value_posz_p(val)
Definition: arithmetique.h:573

Definition at line 564 of file arithmetique.h.

◆ value_abs_eq

#define value_abs_eq (   v1,
  v2 
)    (value_abs(v1) == value_abs(v2))

Definition at line 509 of file arithmetique.h.

◆ value_abs_ge

#define value_abs_ge (   v1,
  v2 
)    (value_abs(v1) >= value_abs(v2))

Definition at line 512 of file arithmetique.h.

◆ value_abs_gt

#define value_abs_gt (   v1,
  v2 
)    (value_abs(v1) > value_abs(v2))

Definition at line 511 of file arithmetique.h.

◆ value_abs_le

#define value_abs_le (   v1,
  v2 
)    (value_abs(v1) <= value_abs(v2))

Definition at line 514 of file arithmetique.h.

◆ value_abs_lt

#define value_abs_lt (   v1,
  v2 
)    (value_abs(v1) < value_abs(v2))

Definition at line 513 of file arithmetique.h.

◆ value_abs_ne

#define value_abs_ne (   v1,
  v2 
)    (value_abs(v1) != value_abs(v2))

Definition at line 510 of file arithmetique.h.

◆ value_absolute

#define value_absolute (   ref,
  val 
)    ((ref) = value_abs((val)))

Definition at line 553 of file arithmetique.h.

◆ value_add_int

#define value_add_int (   ref,
  val,
  vint 
)    ((ref) = (val) + (Value)(vint))

Definition at line 538 of file arithmetique.h.

◆ value_addmul

#define value_addmul (   ref,
  val1,
  val2 
)    ((ref) += (val1) * (val2))

Definition at line 539 of file arithmetique.h.

◆ value_addto

#define value_addto (   ref,
  val1,
  val2 
)    ((ref) = (val1) + (val2))

Definition at line 537 of file arithmetique.h.

◆ value_and

#define value_and (   v1,
  v2 
)    ((v1) & (v2))

Definition at line 532 of file arithmetique.h.

◆ value_andto

#define value_andto (   ref,
  val1,
  val2 
)    ((ref) = (val1) & (val2))

Definition at line 559 of file arithmetique.h.

◆ value_assign

#define value_assign (   v1,
  v2 
)    ((v1) = (v2))

Definition at line 482 of file arithmetique.h.

◆ value_clear

#define value_clear (   val)    ((val) = 0)

Definition at line 485 of file arithmetique.h.

◆ value_cmp

#define value_cmp (   v1,
  v2 
)    (value_eq(v1, v2) ? 0 : value_lt(v1, v2) ? -1 : 1)

Definition at line 519 of file arithmetique.h.

◆ value_cmp_si

#define value_cmp_si (   val,
  n 
)    (val - (n))

Definition at line 581 of file arithmetique.h.

◆ value_decrement

#define value_decrement (   ref,
  val 
)    ((ref) = (val) - VALUE_ONE)

Definition at line 546 of file arithmetique.h.

◆ value_direct_multiply

#define value_direct_multiply (   v1,
  v2 
)    ((v1) * (v2)) /* direct! */

Definition at line 525 of file arithmetique.h.

◆ value_direct_product

#define value_direct_product (   ref,
  val1,
  val2 
)     ((ref) = (val1) * (val2)) /* direct! */

Definition at line 541 of file arithmetique.h.

◆ value_div

#define value_div (   v1,
  v2 
)    ((v1) / (v2))

Definition at line 523 of file arithmetique.h.

◆ value_divexact

#define value_divexact (   ref,
  val1,
  val2 
)    ((ref) = (val1) / (val2))

Definition at line 548 of file arithmetique.h.

◆ value_division

#define value_division (   ref,
  val1,
  val2 
)    ((ref) = (val1) / (val2))

Definition at line 547 of file arithmetique.h.

◆ value_eq

#define value_eq (   v1,
  v2 
)    ((v1) == (v2))

Definition at line 502 of file arithmetique.h.

◆ value_gcd

#define value_gcd (   ref,
  val1,
  val2 
)    Gcd((val1), (val2), &(ref))

Definition at line 556 of file arithmetique.h.

◆ value_ge

#define value_ge (   v1,
  v2 
)    ((v1) >= (v2))

Definition at line 505 of file arithmetique.h.

◆ value_gt

#define value_gt (   v1,
  v2 
)    ((v1) > (v2))

Definition at line 504 of file arithmetique.h.

◆ value_increment

#define value_increment (   ref,
  val 
)    ((ref) = (val) + VALUE_ONE)

Definition at line 540 of file arithmetique.h.

◆ value_init

#define value_init (   val)    ((val) = 0)

Definition at line 481 of file arithmetique.h.

◆ value_lcm

#define value_lcm (   ref,
  val1,
  val2 
)    Lcm3((val1), (val2), &(ref))

Definition at line 557 of file arithmetique.h.

◆ value_le

#define value_le (   v1,
  v2 
)    ((v1) <= (v2))

Definition at line 507 of file arithmetique.h.

◆ value_lshift

#define value_lshift (   v1,
  v2 
)    ((v1) << (v2))

Definition at line 533 of file arithmetique.h.

◆ value_lt

#define value_lt (   v1,
  v2 
)    ((v1) < (v2))

Definition at line 506 of file arithmetique.h.

◆ value_max

#define value_max (   v1,
  v2 
)    (value_ge((v1), (v2)) ? (v1) : (v2))

Definition at line 530 of file arithmetique.h.

◆ value_max_p

#define value_max_p (   val)    value_eq(val, VALUE_MAX)

Definition at line 583 of file arithmetique.h.

◆ value_maximum

#define value_maximum (   ref,
  val1,
  val2 
)    ((ref) = value_max((val1), (val2)))

Definition at line 555 of file arithmetique.h.

◆ value_min

#define value_min (   v1,
  v2 
)    (value_le((v1), (v2)) ? (v1) : (v2))

Definition at line 529 of file arithmetique.h.

◆ value_min_p

#define value_min_p (   val)    value_eq(val, VALUE_MIN)

Definition at line 582 of file arithmetique.h.

◆ value_minimum

#define value_minimum (   ref,
  val1,
  val2 
)    ((ref) = value_min((val1), (val2)))

Definition at line 554 of file arithmetique.h.

◆ value_minus

#define value_minus (   v1,
  v2 
)    ((v1) - (v2))

Definition at line 526 of file arithmetique.h.

◆ value_mod

#define value_mod (   v1,
  v2 
)    ((v1) % (v2))

Definition at line 524 of file arithmetique.h.

◆ value_modulus

#define value_modulus (   ref,
  val1,
  val2 
)    ((ref) = (val1) % (val2))

Definition at line 549 of file arithmetique.h.

◆ value_mone_p

#define value_mone_p (   val)    value_eq(val, VALUE_MONE)

Definition at line 579 of file arithmetique.h.

◆ value_mult

#define value_mult (   v,
 
)
Value:
(fprintf(stderr, "[value_mult] value overflow!\n"), \
#define value_protected_multiply(v, w, throw)
Definition: arithmetique.h:610

Definition at line 632 of file arithmetique.h.

◆ value_multiply

#define value_multiply (   ref,
  val1,
  val2 
)    ((ref) = value_mult((val1), (val2)))

Definition at line 543 of file arithmetique.h.

◆ value_ne

#define value_ne (   v1,
  v2 
)    ((v1) != (v2))

Definition at line 503 of file arithmetique.h.

◆ value_neg_p

#define value_neg_p (   val)    value_lt(val, VALUE_ZERO)

Definition at line 572 of file arithmetique.h.

◆ value_negz_p

#define value_negz_p (   val)    value_le(val, VALUE_ZERO)

Definition at line 574 of file arithmetique.h.

◆ value_not

#define value_not (   val)    (~(val))

Definition at line 563 of file arithmetique.h.

◆ value_notmax_p

#define value_notmax_p (   val)    value_ne(val, VALUE_MAX)

Definition at line 585 of file arithmetique.h.

◆ value_notmin_p

#define value_notmin_p (   val)    value_ne(val, VALUE_MIN)

Definition at line 584 of file arithmetique.h.

◆ value_notmone_p

#define value_notmone_p (   val)    value_ne(val, VALUE_MONE)

Definition at line 580 of file arithmetique.h.

◆ value_notone_p

#define value_notone_p (   val)    value_ne(val, VALUE_ONE)

Definition at line 578 of file arithmetique.h.

◆ value_notzero_p

#define value_notzero_p (   val)    value_ne(val, VALUE_ZERO)

Definition at line 576 of file arithmetique.h.

◆ value_one_p

#define value_one_p (   val)    value_eq(val, VALUE_ONE)

Definition at line 577 of file arithmetique.h.

◆ value_oppose

#define value_oppose (   ref,
  val 
)    ((ref) = value_uminus((val)))

Definition at line 552 of file arithmetique.h.

◆ value_or

#define value_or (   v1,
  v2 
)    ((v1) | (v2))

Definition at line 531 of file arithmetique.h.

◆ value_orto

#define value_orto (   ref,
  val1,
  val2 
)    ((ref) = (val1) | (val2))

Definition at line 558 of file arithmetique.h.

◆ value_pdiv

#define value_pdiv (   v1,
  v2 
)    (DIVIDE((v1), (v2)))

Definition at line 527 of file arithmetique.h.

◆ value_pdivision

#define value_pdivision (   ref,
  val1,
  val2 
)    ((ref) = value_pdiv((val1), (val2)))

Definition at line 550 of file arithmetique.h.

◆ value_plus

#define value_plus (   v1,
  v2 
)    ((v1) + (v2))

Definition at line 522 of file arithmetique.h.

◆ value_pmod

#define value_pmod (   v1,
  v2 
)    (MODULO((v1), (v2)))

Definition at line 528 of file arithmetique.h.

◆ value_pmodulus

#define value_pmodulus (   ref,
  val1,
  val2 
)    ((ref) = value_pmod((val1), (val2)))

Definition at line 551 of file arithmetique.h.

◆ value_pos_p

#define value_pos_p (   val)    value_gt(val, VALUE_ZERO)

Definition at line 571 of file arithmetique.h.

◆ value_posz_p

#define value_posz_p (   val)    value_ge(val, VALUE_ZERO)

Definition at line 573 of file arithmetique.h.

◆ value_print

#define value_print (   Dst,
  fmt,
  val 
)    (fprintf((Dst), (fmt), (val)))

Definition at line 487 of file arithmetique.h.

◆ value_product

#define value_product (   v,
 
)    v = value_mult(v, w)

Definition at line 636 of file arithmetique.h.

◆ value_protected_hard_idiv_multiply

#define value_protected_hard_idiv_multiply (   v,
  w,
  throw 
)
Value:
((value_zero_p(w) || value_zero_p(v)) ? VALUE_ZERO \
: value_lt(value_abs(v), value_div(VALUE_MAX, value_abs(w))) \
: (throw, VALUE_NAN))
#define value_direct_multiply(v1, v2)
Definition: arithmetique.h:525
#define value_zero_p(val)
Definition: arithmetique.h:575
#define value_abs(val)
Definition: arithmetique.h:564
#define value_lt(v1, v2)
Definition: arithmetique.h:506
#define value_div(v1, v2)
Definition: arithmetique.h:523

Definition at line 595 of file arithmetique.h.

◆ value_protected_mult

#define value_protected_mult (   v,
 
)     value_protected_multiply(v, w, THROW(overflow_error))

Definition at line 616 of file arithmetique.h.

◆ value_protected_multiply

#define value_protected_multiply (   v,
  w,
  throw 
)     value_protected_hard_idiv_multiply(v, w, throw)

Definition at line 610 of file arithmetique.h.

◆ value_protected_product

#define value_protected_product (   v,
 
)    v = value_protected_mult(v, w)

Definition at line 618 of file arithmetique.h.

◆ value_read

#define value_read (   val,
  str 
)    (sscanf((str), VALUE_FMT, &(val)))

Definition at line 486 of file arithmetique.h.

◆ value_rshift

#define value_rshift (   v1,
  v2 
)    ((v1) >> (v2))

Definition at line 534 of file arithmetique.h.

◆ value_set_double

#define value_set_double (   val,
 
)    ((val) = (Value)(d))

Definition at line 484 of file arithmetique.h.

◆ value_set_si

#define value_set_si (   val,
 
)    ((val) = (Value)(i))

Definition at line 483 of file arithmetique.h.

◆ value_sign

#define value_sign (   v)     (value_eq(v, VALUE_ZERO) ? 0 : value_lt(v, VALUE_ZERO) ? -1 : 1)

Definition at line 517 of file arithmetique.h.

◆ value_sub_int

#define value_sub_int (   ref,
  val,
  vint 
)    ((ref) = (val) - (Value)(vint))

Definition at line 545 of file arithmetique.h.

◆ value_substract

#define value_substract (   ref,
  val1,
  val2 
)    (value_subtract((ref), (val1), (val2)))

Definition at line 717 of file arithmetique.h.

◆ value_subtract

#define value_subtract (   ref,
  val1,
  val2 
)    ((ref) = (val1) - (val2))

Definition at line 544 of file arithmetique.h.

◆ value_swap

#define value_swap (   v1,
  v2 
)
Value:
{ \
Value tmp; \
tmp = v2; \
v2 = v1; \
v1 = tmp; \
}

Definition at line 488 of file arithmetique.h.

◆ value_uminus

#define value_uminus (   val)    (-(val))

Definition at line 562 of file arithmetique.h.

◆ value_zero_p

#define value_zero_p (   val)    value_eq(val, VALUE_ZERO)

Definition at line 575 of file arithmetique.h.

Function Documentation

◆ dump_exception_stack()

void dump_exception_stack ( void  )

◆ dump_exception_stack_to_file()

void dump_exception_stack_to_file ( FILE *  f)

Definition at line 240 of file errors.c.

References exception_index, and exception_stack.

Referenced by dump_exception_stack().

◆ free_exception_stack()

void free_exception_stack ( void  )

Definition at line 207 of file errors.c.

References assert, and exception_stack.

Referenced by polylib_close().

◆ pop_exception_from_stack()

void pop_exception_from_stack ( int  what,
const char *  function,
const char *  file,
int  line 
)

◆ push_exception_on_stack()

◆ throw_exception()

void throw_exception ( int  what,
const char *  function,
const char *  file,
int  line 
)

Variable Documentation

◆ any_exception_error

◆ overflow_error

unsigned int overflow_error
extern

◆ parser_exception_error

unsigned int parser_exception_error
extern

Definition at line 99 of file errors.c.

Referenced by get_exception_name().

◆ simplex_arithmetic_error

unsigned int simplex_arithmetic_error
extern

Definition at line 97 of file errors.c.

Referenced by get_exception_name().

◆ the_last_just_thrown_exception

unsigned int the_last_just_thrown_exception
extern

Definition at line 141 of file errors.c.

Referenced by pop_exception_from_stack(), push_exception_on_stack(), and throw_exception().

◆ user_exception_error

unsigned int user_exception_error
extern

Definition at line 98 of file errors.c.

Referenced by get_exception_name().