#include <stdio.h>
#include <limits.h>
#include "arithmetic_errors.h"
#include <gmp.h>
Go to the source code of this file.
Compounds | |
struct | col |
struct | frac |
Defines | |
#define | __LONG_LONG_MAX__ 9223372036854775807LL |
#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 | LINEAR_VALUE_STRING "gmp" |
#define | VALUE_FMT "%s" |
#define | VALUE_TO_LONG(val) (mpz_get_si(val)) |
#define | VALUE_TO_INT(val) ((int)mpz_get_si(val)) |
#define | VALUE_TO_FLOAT(val) ((float)((int)mpz_get_si(val))) |
#define | VALUE_TO_DOUBLE(val) (mpz_get_d(val)) |
#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_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_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_substract(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_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_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 | 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) |
#define | divide(a, b) DIVIDE(a,b) |
#define | modulo(a, b) MODULO(a,b) |
Typedefs | |
typedef mpz_t | Value |
typedef col | tableau |
Functions | |
void | dump_exception_stack_to_file (FILE *) |
void | dump_exception_stack (void) |
jmp_buf * | push_exception_on_stack (int, char *, char *, int) |
void | pop_exception_from_stack (int, char *, 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 |
int | linear_exception_debug_mode |
|
Definition at line 59 of file include/polylib/arithmetique.h. |
|
Definition at line 543 of file include/polylib/arithmetique.h. |
|
Definition at line 588 of file include/polylib/arithmetique.h. |
|
Value: ((y)>0? POSITIVE_DIVIDE(x,y) : \ -POSITIVE_DIVIDE((x),(-(y)))) Definition at line 566 of file include/polylib/arithmetique.h. |
|
Definition at line 333 of file include/polylib/arithmetique.h. |
|
Definition at line 332 of file include/polylib/arithmetique.h. |
|
Definition at line 330 of file include/polylib/arithmetique.h. |
|
Definition at line 228 of file include/polylib/arithmetique.h. |
|
Definition at line 62 of file include/polylib/arithmetique.h. |
|
Definition at line 64 of file include/polylib/arithmetique.h. |
|
Definition at line 331 of file include/polylib/arithmetique.h. |
|
Definition at line 554 of file include/polylib/arithmetique.h. |
|
Definition at line 551 of file include/polylib/arithmetique.h. |
|
Definition at line 590 of file include/polylib/arithmetique.h. |
|
Definition at line 573 of file include/polylib/arithmetique.h. |
|
Definition at line 570 of file include/polylib/arithmetique.h. |
|
Value: ((x) > 0 ? (x)%(y) : \ ((x)%(y) == 0 ? 0 : ((y)-(-(x))%(y)))) Definition at line 581 of file include/polylib/arithmetique.h. |
|
Definition at line 558 of file include/polylib/arithmetique.h. |
|
Definition at line 66 of file include/polylib/arithmetique.h. |
|
Value: (value_posz_p(val)? \ (val) : \ (value_ne((val), VALUE_NAN) ? \ value_uminus(val) : \ (THROW (overflow_error), VALUE_NAN ))) Definition at line 389 of file include/polylib/arithmetique.h. |
|
Definition at line 379 of file include/polylib/arithmetique.h. |
|
Definition at line 368 of file include/polylib/arithmetique.h. |
|
Definition at line 367 of file include/polylib/arithmetique.h. |
|
Definition at line 361 of file include/polylib/arithmetique.h. |
|
Definition at line 383 of file include/polylib/arithmetique.h. |
|
Definition at line 319 of file include/polylib/arithmetique.h. |
|
Definition at line 322 of file include/polylib/arithmetique.h. |
|
Definition at line 347 of file include/polylib/arithmetique.h. |
|
Definition at line 374 of file include/polylib/arithmetique.h. |
|
Definition at line 354 of file include/polylib/arithmetique.h. |
|
Definition at line 370 of file include/polylib/arithmetique.h. |
|
Definition at line 352 of file include/polylib/arithmetique.h. |
|
Definition at line 375 of file include/polylib/arithmetique.h. |
|
Definition at line 337 of file include/polylib/arithmetique.h. |
|
Definition at line 230 of file include/polylib/arithmetique.h. |
|
Definition at line 340 of file include/polylib/arithmetique.h. |
|
Definition at line 339 of file include/polylib/arithmetique.h. |
|
Definition at line 369 of file include/polylib/arithmetique.h. |
|
Definition at line 318 of file include/polylib/arithmetique.h. |
|
Definition at line 342 of file include/polylib/arithmetique.h. |
|
Definition at line 362 of file include/polylib/arithmetique.h. |
|
Definition at line 341 of file include/polylib/arithmetique.h. |
|
Definition at line 359 of file include/polylib/arithmetique.h. |
|
Definition at line 408 of file include/polylib/arithmetique.h. |
|
Definition at line 381 of file include/polylib/arithmetique.h. |
|
Definition at line 358 of file include/polylib/arithmetique.h. |
|
Definition at line 407 of file include/polylib/arithmetique.h. |
|
Definition at line 380 of file include/polylib/arithmetique.h. |
|
Definition at line 355 of file include/polylib/arithmetique.h. |
|
Definition at line 353 of file include/polylib/arithmetique.h. |
|
Definition at line 376 of file include/polylib/arithmetique.h. |
|
Definition at line 405 of file include/polylib/arithmetique.h. |
|
Value: value_protected_multiply(v,w, \ (fprintf(stderr,"[value_mult] value overflow!\n"),THROW(overflow_error))) Definition at line 458 of file include/polylib/arithmetique.h. |
|
Definition at line 371 of file include/polylib/arithmetique.h. |
|
Definition at line 338 of file include/polylib/arithmetique.h. |
|
Definition at line 398 of file include/polylib/arithmetique.h. |
|
Definition at line 400 of file include/polylib/arithmetique.h. |
|
Definition at line 388 of file include/polylib/arithmetique.h. |
|
Definition at line 410 of file include/polylib/arithmetique.h. |
|
Definition at line 409 of file include/polylib/arithmetique.h. |
|
Definition at line 406 of file include/polylib/arithmetique.h. |
|
Definition at line 404 of file include/polylib/arithmetique.h. |
|
Definition at line 402 of file include/polylib/arithmetique.h. |
|
Definition at line 403 of file include/polylib/arithmetique.h. |
|
Definition at line 378 of file include/polylib/arithmetique.h. |
|
Definition at line 360 of file include/polylib/arithmetique.h. |
|
Definition at line 382 of file include/polylib/arithmetique.h. |
|
Definition at line 356 of file include/polylib/arithmetique.h. |
|
Definition at line 377 of file include/polylib/arithmetique.h. |
|
Definition at line 351 of file include/polylib/arithmetique.h. |
|
Definition at line 357 of file include/polylib/arithmetique.h. |
|
Definition at line 397 of file include/polylib/arithmetique.h. |
|
Definition at line 399 of file include/polylib/arithmetique.h. |
|
Definition at line 324 of file include/polylib/arithmetique.h. |
|
Definition at line 461 of file include/polylib/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 422 of file include/polylib/arithmetique.h. |
|
Definition at line 441 of file include/polylib/arithmetique.h. |
|
Definition at line 435 of file include/polylib/arithmetique.h. |
|
Definition at line 443 of file include/polylib/arithmetique.h. |
|
Definition at line 323 of file include/polylib/arithmetique.h. |
|
Definition at line 363 of file include/polylib/arithmetique.h. |
|
Definition at line 321 of file include/polylib/arithmetique.h. |
|
Definition at line 320 of file include/polylib/arithmetique.h. |
|
Definition at line 346 of file include/polylib/arithmetique.h. |
|
Definition at line 373 of file include/polylib/arithmetique.h. |
|
Definition at line 372 of file include/polylib/arithmetique.h. |
|
Value: {Value tmp; tmp = v2; \ v2 = v1; v1 = tmp; \ } Definition at line 325 of file include/polylib/arithmetique.h. |
|
Definition at line 239 of file include/polylib/arithmetique.h. |
|
Definition at line 238 of file include/polylib/arithmetique.h. |
|
Definition at line 237 of file include/polylib/arithmetique.h. |
|
Definition at line 236 of file include/polylib/arithmetique.h. |
|
Definition at line 387 of file include/polylib/arithmetique.h. |
|
Definition at line 401 of file include/polylib/arithmetique.h. |
|
|
|
Definition at line 229 of file include/polylib/arithmetique.h. |
|
Definition at line 209 of file errors.c. References dump_exception_stack_to_file(). |
|
Definition at line 192 of file errors.c. References exception_index. Referenced by dump_exception_stack(). |
|
Definition at line 261 of file errors.c. References dump_exception_stack(), exception_debug_message, exception_debug_trace, exception_index, pop_callback, same_string_p, and the_last_just_thrown_exception. |
|
Definition at line 225 of file errors.c. References dump_exception_stack(), exception_debug_message, exception_debug_trace, exception_index, MAX_STACKED_CONTEXTS, push_callback, and the_last_just_thrown_exception. |
|
Definition at line 305 of file errors.c. References dump_exception_stack(), exception_debug_message, exception_debug_trace, exception_index, linear_exception_verbose, linear_number_of_exception_thrown, pop_callback, the_last_just_thrown_exception, and linear_exception_holder::what. |
|
Definition at line 600 of file include/polylib/arithmetique.h. Referenced by get_exception_name(). |
|
Definition at line 602 of file include/polylib/arithmetique.h. |
|
Definition at line 596 of file include/polylib/arithmetique.h. Referenced by get_exception_name(). |
|
Definition at line 599 of file include/polylib/arithmetique.h. Referenced by get_exception_name(). |
|
Definition at line 597 of file include/polylib/arithmetique.h. Referenced by get_exception_name(). |
|
Definition at line 601 of file include/polylib/arithmetique.h. Referenced by pop_exception_from_stack(), push_exception_on_stack(), and throw_exception(). |
|
Definition at line 598 of file include/polylib/arithmetique.h. Referenced by get_exception_name(). |