#include "float.h"#include "eg_lpnum.h"

Go to the source code of this file.
Defines | |
| #define | int_EGlpNumAddInnProdTo(a, b, c) ((a) += (b)*(c)) |
| Add to a given number the product of two numbers. | |
| #define | int_EGlpNumAddTo(a, b) ((a) += (b)) |
| Add to a given number the value of the second number. | |
| #define | int_EGlpNumAddUiTo(a, b) ((a) += (b)) |
| Add to a given number the value of the second number. | |
| #define | int_EGlpNumAllocArray(size) __EGlpNumAllocArray(int,size) |
| Allocate and initialize (if needed) 'size' elements of type int and return it, if no more memory, exit(1). | |
| #define | int_EGlpNumCeil(a, b) int_EGlpNumSet(a,b) |
| Stores in the first number the ceil value of the second number, i.e. EGlpNumCeil(a,b) <==> a= ceil(b). | |
| #define | int_EGlpNumClearVar(a) |
| free the internal memory of a given variable | |
| #define | int_EGlpNumCopy(dest, orig) ((dest) = (orig)) |
| copy the value of the second number to the first. | |
| #define | int_EGlpNumCopyAbs(dest, orig) ((dest) = EGabs(orig)) |
| copy the value of the absolute value of the second parameter to the first parameter. | |
| #define | int_EGlpNumCopyArray(dest, orig, size) memcpy(dest,orig,sizeof(int)*(size)) |
| copy the first 'size' values in the second array to the first array. | |
| #define | int_EGlpNumCopyDiff(dest, a, b) ((dest) = (a) - (b)) |
| copy the value of the second number to the first. | |
| #define | int_EGlpNumCopyDiffRatio(dest, a, b, den) ((dest) = ((a) - (b)) / (den)) |
| copy the value of the second number to the first. | |
| #define | int_EGlpNumCopyFrac(dest, op1, op2) ((dest) = (op1)/(op2)) |
| Set des = op1/op2. | |
| #define | int_EGlpNumCopyNeg(dest, orig) ((dest) = -(orig)) |
| copy minus the value of the second parameter to the first parameter. | |
| #define | int_EGlpNumCopySqrOver(dest, orig, den) ((dest) = (orig)*(orig)/(den)) |
| copy the square of the second argument, divided by the third argument into the first argument. | |
| #define | int_EGlpNumCopySum(dest, a, b) ((dest) = (a) + (b)) |
| copy the value of the sum of the second and third parameter | |
| #define | int_EGlpNumDivTo(a, b) ((a) /= (b)) |
| Divide a given number by the value of the second number. | |
| #define | int_EGlpNumDivUiTo(a, b) ((a) /= (b)) |
| Divide a given number by the value of the second number. | |
| #define | int_EGlpNumFloor(a, b) int_EGlpNumSet(a,b) |
| Stores in the first number the floor value of the second number, i.e. EGlpNumFloor(a,b) <==> a= floor(b). | |
| #define | int_EGlpNumFreeArray(ea) __EGlpNumFreeArray(ea) |
| given an array of type int, free it, if the pointer is NULL nothing happen. | |
| #define | int_EGlpNumGetStr(a) |
| given a int, write it to a string (to be allocated internally), and return it. | |
| #define | int_EGlpNumInitVar(a) int_EGlpNumZero(a) |
| initialize the internal memory of a given variable | |
| #define | int_EGlpNumInv(a) ((a) = 1/(a)) |
| store the (multiplicative) inverse of a number to itself, i.e. implement a = 1/a. | |
| #define | int_EGlpNumIsDiffLess(a, b, c) ((a) - (b) < (c)) |
| test if the diference of the first two numbers is less thatn the third number. | |
| #define | int_EGlpNumIsEqqual(a, b) ((a) == (b)) |
| Compare if two numbers are equal within a maximum error. | |
| #define | int_EGlpNumIsEqual(a, b, error) (EGabs((a)-(b)) <= (error)) |
| Compare if two numbers are equal within a maximum error. | |
| #define | int_EGlpNumIsGreaDbl(a, b) ((a) > (b)) |
| test if the first number is bigger to the second number | |
| #define | int_EGlpNumIsGreatZero(a) (a > 0) |
| test if a numer is greater than zero | |
| #define | int_EGlpNumIsLeq(a, b) ((a) <= (b)) |
| test if the first number is bigger to the second number | |
| #define | int_EGlpNumIsLess(a, b) (a < b) |
| test if the first number is bigger to the second number | |
| #define | int_EGlpNumIsLessDbl(a, b) ((a) < (b)) |
| test if the first number is bigger to the second number | |
| #define | int_EGlpNumIsLessZero(a) (a < 0) |
| test if a numer is less than zero | |
| #define | int_EGlpNumIsNeq(a, b, error) (((a)-(b) > (error)) || ((b)-(a) > (error))) |
| #define | int_EGlpNumIsNeqq(a, b) ((a) != (b)) |
| #define | int_EGlpNumIsNeqqZero(a) ((a) != 0) |
| #define | int_EGlpNumIsNeqZero(a, error) (((a) > (error)) || (-(a) > (error))) |
| #define | int_EGlpNumIsSumLess(a, b, c) ((a) + (b) < (c)) |
| test if the sum of the first two numbers is less thatn the third number. | |
| #define | int_EGlpNumMultTo(a, b) ((a) *= (b)) |
| Multiply a given number by the value of the second number. | |
| #define | int_EGlpNumMultUiTo(a, b) ((a) *= (b)) |
| Multiply a given number by the value of the second number. | |
| #define | int_EGlpNumOne(a) ((a) = 1) |
| Reset the value of the pointed number to one. | |
| #define | int_EGlpNumReadStr(a, str) |
| Read from a string a number and store it in the given int,. | |
| #define | int_EGlpNumReallocArray(lptr, lsize) |
| Reallocate and initialize (if needed) 'size' elements of type EGlpNum_t and return it, if no more memory, exit(1). | |
| #define | int_EGlpNumSet(var, dbl_var) ((var) = (dbl_var)) |
| set the given number pointer, set its value to the given int. | |
| #define | int_EGlpNumSetToMaxAbs(dest, orig) |
| change the fist number to the maximum between itself and the absolute value of the second. | |
| #define | int_EGlpNumSetToMinAbs(dest, orig) |
| #define | int_EGlpNumSign(a) ((a) = -(a)) |
| Change the sign of the number. | |
| #define | int_EGlpNumSubInnProdTo(a, b, c) ((a) -= (b)*(c)) |
| Sub to a given number the product of two numbers. | |
| #define | int_EGlpNumSubTo(a, b) ((a) -= (b)) |
| Substract to a given number the value of the second number. | |
| #define | int_EGlpNumSubUiTo(a, b) ((a) -= (b)) |
| Substract to a given number the value of the second number. | |
| #define | int_EGlpNumToLf(a) ((double)a) |
| return the closest int value of the given pointer number. | |
| #define | int_EGlpNumZero(a) ((a) = 0) |
| Reset the value of the pointed number to zero. | |
| #define | int_epsLpNum 0 |
| #define | int_MaxLpNum INT_MAX |
| #define | int_MinLpNum INT_MIN |
| #define | int_oneLpNum 1 |
| #define | int_zeroLpNum 0 |
Definition in file eg_lpnum.int.h.
1.7.1