#include <stdio.h>
#include <limits.h>
#include "arithmetic_errors.h"
Go to the source code of this file.
Defines | |
#define | __LONG_LONG_MAX__ 9223372036854775807LL |
package arithmetique | |
#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_compare(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)) |
#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)) |
#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_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_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) |
#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) |
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) |
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 |
|
package arithmetique
Francois Irigoin, mai 1989 Modifications
Definition at line 81 of file arithmetique.h. |
|
Definition at line 671 of file arithmetique.h. |
|
Value: ((y)>0? POSITIVE_DIVIDE(x,y) : \ -POSITIVE_DIVIDE((x),(-(y)))) Definition at line 694 of file arithmetique.h. |
|
Definition at line 449 of file arithmetique.h. |
|
Definition at line 448 of file arithmetique.h. |
|
Definition at line 446 of file arithmetique.h. |
|
Definition at line 84 of file arithmetique.h. |
|
Definition at line 86 of file arithmetique.h. |
|
Definition at line 447 of file arithmetique.h. |
|
Definition at line 682 of file arithmetique.h. |
|
Definition at line 679 of file arithmetique.h. |
|
Definition at line 701 of file arithmetique.h. |
|
Definition at line 698 of file arithmetique.h. |
|
Value: ((x) > 0 ? (x)%(y) : \ ((x)%(y) == 0 ? 0 : ((y)-(-(x))%(y)))) Definition at line 709 of file arithmetique.h. |
|
Definition at line 686 of file arithmetique.h. |
|
Definition at line 88 of file arithmetique.h. |
|
Value: (value_posz_p(val)? \ (val) : \ (value_ne((val), VALUE_NAN) ? \ value_uminus(val) : \ (THROW (overflow_error), VALUE_NAN ))) Definition at line 514 of file arithmetique.h. |
|
Definition at line 460 of file arithmetique.h. Referenced by SortConstraints(). |
|
Definition at line 463 of file arithmetique.h. |
|
Definition at line 462 of file arithmetique.h. |
|
Definition at line 465 of file arithmetique.h. |
|
Definition at line 464 of file arithmetique.h. Referenced by SortConstraints(). |
|
Definition at line 461 of file arithmetique.h. Referenced by ImplicitEqualities(). |
|
Definition at line 504 of file arithmetique.h. Referenced by Combine(), encore(), GaussSimplify(), Gcd(), hermite(), Lcm3(), old_Polyhedron_Preprocess(), petit_c(), petit_l(), Print_Vertex(), Vector_Gcd(), and Vector_Min_Not_Zero(). |
|
Definition at line 491 of file arithmetique.h. Referenced by count_points(), FindSimple(), lower_upper_bounds(), P_Enum(), and Polyhedron_Preprocess2(). |
|
|
Definition at line 490 of file arithmetique.h. Referenced by AffineSmith(), count_points(), dehomogenize_polynomial(), DomainCost(), eadd(), eliminate_var_with_constr(), ImplicitEqualities(), mpolyhedron_deflate(), mpolyhedron_inflate(), new_eadd(), P_Enum(), Poly2Sat(), Polyhedron_Enumerate(), Polyhedron_Preprocess(), Polyhedron_Preprocess2(), Simplify(), test_Constraints_fullDimensionize(), and Vector_Add(). |
|
Definition at line 484 of file arithmetique.h. |
|
Definition at line 508 of file arithmetique.h. |
|
|
|
Definition at line 532 of file arithmetique.h. Referenced by Constraints_Remove_parm_eqs(), Gauss4(), mpolyhedron_eliminate_first_variables(), and Remove_Redundants(). |
|
Definition at line 470 of file arithmetique.h. |
|
Definition at line 498 of file arithmetique.h. Referenced by addToFilter(), AffineSmith(), cherche_min(), FindSimple(), hermite(), Polyhedron_Image_Enumerate(), smith(), and SubConstraint(). |
|
Definition at line 477 of file arithmetique.h. |
|
Definition at line 494 of file arithmetique.h. |
|
Definition at line 475 of file arithmetique.h. |
|
|
Definition at line 453 of file arithmetique.h. Referenced by DomainCost(), FindSimple(), ImplicitEqualities(), Simplify(), SortConstraints(), and test_Constraints_fullDimensionize(). |
|
Definition at line 456 of file arithmetique.h. Referenced by cherche_min(), GaussSimplify(), isinHnf(), petit_c(), petit_l(), and Simplify(). |
|
Definition at line 455 of file arithmetique.h. Referenced by AffinePartCompare(), DomainCost(), FindSimple(), LinearPartCompare(), lower_upper_bounds(), P_Enum(), Polyhedron_Preprocess2(), Simplify(), and Vector_Normalize(). |
|
Definition at line 493 of file arithmetique.h. Referenced by check_poly(), cherche_min(), count_points(), exist_points(), FindSimple(), P_Enum(), recurse(), Remove_Redundants(), and Simplify(). |
|
|
Definition at line 458 of file arithmetique.h. Referenced by check_poly(), cherche_min(), count_points(), exist_points(), Polyhedron_Preprocess2(), and recurse(). |
|
Definition at line 485 of file arithmetique.h. |
|
Definition at line 457 of file arithmetique.h. Referenced by AffinePartCompare(), count_points(), DomainCost(), exist_points(), hermite(), LinearPartCompare(), lower_upper_bounds(), P_Enum(), Polyhedron_Preprocess2(), Simplify(), SortConstraints(), Vector_Min_Not_Zero(), and Vector_Sort(). |
|
Definition at line 482 of file arithmetique.h. |
|
Definition at line 534 of file arithmetique.h. |
|
Definition at line 506 of file arithmetique.h. Referenced by Vector_Max(). |
|
Definition at line 481 of file arithmetique.h. |
|
Definition at line 533 of file arithmetique.h. |
|
Definition at line 505 of file arithmetique.h. Referenced by Vector_Min(). |
|
Definition at line 478 of file arithmetique.h. |
|
Definition at line 476 of file arithmetique.h. |
|
Definition at line 500 of file arithmetique.h. Referenced by AffineSmith(), encore(), Gcd(), hermite(), isIntegral(), lower_upper_bounds(), P_Enum(), smith(), SolveDiophantine(), and Vector_Gcd(). |
|
Definition at line 530 of file arithmetique.h. Referenced by Degenerate(), Print_Domain(), and Print_Vertex(). |
|
Value: value_protected_multiply(v,w, \ (fprintf(stderr,"[value_mult] value overflow!\n"),THROW(overflow_error))) Definition at line 584 of file arithmetique.h. |
|
|
Definition at line 454 of file arithmetique.h. Referenced by AlmostSameAffinePart(), check_poly(), DomainCost(), eequal(), Polyhedron_Preprocess(), sameAffinepart(), sameLattice(), SameLinearPart(), SolveDiophantine(), and Vector_Equal(). |
|
Definition at line 523 of file arithmetique.h. Referenced by AffineSmith(), CalcBase(), cherche_min(), Chernikova(), Gauss4(), GaussSimplify(), hermite(), ImplicitEqualities(), in_domain(), lower_upper_bounds(), Matrix_Inverse(), mpolyhedron_inflate(), P_Enum(), Polyhedron_Preprocess(), PolyhedronIncludes(), PolyhedronLTQ(), RaySort(), Remove_Redundants(), smith(), and Vector_Normalize_Positive(). |
|
Definition at line 525 of file arithmetique.h. Referenced by old_Polyhedron_Preprocess(). |
|
Definition at line 513 of file arithmetique.h. |
|
Definition at line 536 of file arithmetique.h. |
|
Definition at line 535 of file arithmetique.h. |
|
Definition at line 531 of file arithmetique.h. Referenced by count_points(). |
|
Definition at line 529 of file arithmetique.h. Referenced by compute_evalue(), ConstraintSimplify(), eadd(), emul(), Enumerate_NoParameters(), evalue_div(), GaussSimplify(), GenParamPolyhedron(), IsLattice(), MatInverse(), Matrix_Inverse(), new_eadd(), Orthogonal_Base(), print_evalue(), Print_Vertex(), Rays_Mult(), Rays_Mult_Transpose(), Scan_Vertices(), Vector_Gcd(), and Vector_Normalize_Positive(). |
|
|
Definition at line 528 of file arithmetique.h. Referenced by ConstraintSimplify(), GaussSimplify(), isEmptyLattice(), LatticeImage(), PolyhedronLTQ(), Print_Domain(), rat_prodmat(), reduce_evalue(), and Remove_Redundants(). |
|
|
Definition at line 483 of file arithmetique.h. |
|
Definition at line 507 of file arithmetique.h. Referenced by Vector_Or(). |
|
Definition at line 479 of file arithmetique.h. |
|
Definition at line 501 of file arithmetique.h. Referenced by ConstraintSimplify(), Equalities_integerSolution(), and test_Constraints_fullDimensionize(). |
|
Definition at line 474 of file arithmetique.h. |
|
Definition at line 480 of file arithmetique.h. |
|
Definition at line 502 of file arithmetique.h. Referenced by compute_enode(), and Equalities_integerSolution(). |
|
Definition at line 522 of file arithmetique.h. Referenced by cherche_min(), eliminate_var_with_constr(), exist_points(), FindSimple(), ImplicitEqualities(), lower_upper_bounds(), mpolyhedron_deflate(), P_Enum(), Polyhedron_Image_Enumerate(), PolyhedronLTQ(), Print_Domain(), and SortConstraints(). |
|
Definition at line 524 of file arithmetique.h. Referenced by addToFilter(), FindSimple(), old_Polyhedron_Preprocess(), and Print_Vertex(). |
|
|
Definition at line 587 of file arithmetique.h. |
|
Value: ((value_zero_p(w) || value_zero_p(v))? VALUE_ZERO: \ value_lt(value_abs(v),value_div(VALUE_MAX,value_abs(w)))? \ value_direct_multiply(v,w): (throw, VALUE_NAN)) Definition at line 548 of file arithmetique.h. |
|
Definition at line 567 of file arithmetique.h. |
|
Definition at line 561 of file arithmetique.h. |
|
Definition at line 569 of file arithmetique.h. |
|
Definition at line 439 of file arithmetique.h. Referenced by main(), Matrix_Read_Input(), and Vector_Read(). |
|
Definition at line 486 of file arithmetique.h. |
|
Definition at line 437 of file arithmetique.h. Referenced by compute_poly(). |
|
|
Definition at line 469 of file arithmetique.h. Referenced by ImplicitEqualities(). |
|
Definition at line 497 of file arithmetique.h. Referenced by lower_upper_bounds(), P_Enum(), Polyhedron_Preprocess(), and Polyhedron_Preprocess2(). |
|
Definition at line 666 of file arithmetique.h. |
|
|
Value: {Value tmp; tmp = v2; \ v2 = v1; v1 = tmp; \ } Definition at line 441 of file arithmetique.h. Referenced by ExchangeColumns(), and Vector_Exchange(). |
|
Definition at line 512 of file arithmetique.h. |
|
|
Definition at line 216 of file errors.c. References dump_exception_stack_to_file(). Referenced by pop_exception_from_stack(), push_exception_on_stack(), and throw_exception(). |
|
Definition at line 199 of file errors.c. References exception_index, and exception_stack. Referenced by dump_exception_stack(). |
|
Definition at line 268 of file errors.c. References dump_exception_stack(), exception_debug_message, exception_debug_trace, exception_index, exception_stack, pop_callback, same_string_p, and the_last_just_thrown_exception. |
|
Definition at line 232 of file errors.c. References dump_exception_stack(), exception_debug_message, exception_debug_trace, exception_index, exception_stack, MAX_STACKED_CONTEXTS, push_callback, and the_last_just_thrown_exception. |
|
Definition at line 312 of file errors.c. References dump_exception_stack(), exception_debug_message, exception_debug_trace, exception_index, exception_stack, linear_exception_debug_mode, linear_exception_verbose, linear_number_of_exception_thrown, pop_callback, the_last_just_thrown_exception, and linear_exception_holder::what. |
|
Definition at line 717 of file arithmetique.h. Referenced by AddConstraints(), AddRays(), align_context(), BuildSat(), Chernikova(), Constraints2Polyhedron(), DomainConvex(), DomainCost(), DomainImage(), DomainPreimage(), FindSimple(), Gauss4(), get_exception_name(), Polyhedron_Image(), Polyhedron_Preimage(), Rays2Polyhedron(), Rays_Mult(), Rays_Mult_Transpose(), Remove_Redundants(), SimplifyConstraints(), Stras_DomainSimplify(), and SubConstraint(). |
|
Definition at line 713 of file arithmetique.h. Referenced by Ehrhart_Quick_Apx_Full_Dim(), Enumerate_NoParameters(), get_exception_name(), and Polyhedron_Enumerate(). |
|
Definition at line 716 of file arithmetique.h. Referenced by get_exception_name(). |
|
Definition at line 714 of file arithmetique.h. Referenced by get_exception_name(). |
|
Definition at line 718 of file arithmetique.h. |
|
Definition at line 715 of file arithmetique.h. Referenced by get_exception_name(). |