00001 /* EGlib "Efficient General Library" provides some basic structures and 00002 * algorithms commons in many optimization algorithms. 00003 * 00004 * Copyright (C) 2005 Daniel Espinoza and Marcos Goycoolea. 00005 * 00006 * This library is free software; you can redistribute it and/or modify it 00007 * under the terms of the GNU Lesser General Public License as published by the 00008 * Free Software Foundation; either version 2.1 of the License, or (at your 00009 * option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, but 00012 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 00013 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 00014 * License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public License 00017 * along with this library; if not, write to the Free Software Foundation, 00018 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00019 * */ 00020 #ifndef __EG_LPNUM_DBL__ 00021 #define __EG_LPNUM_DBL__ 00022 #include <float.h> 00023 #include "eg_lpnum.h" 00024 /** @file 00025 * @ingroup EGlpNum */ 00026 /** @addtogroup EGlpNum */ 00027 /** @{ */ 00028 /* ========================================================================= */ 00029 /** extern definitions of constaants for different set-ups */ 00030 #define dbl_zeroLpNum 0.0 00031 #define dbl_oneLpNum 1.0 00032 #define dbl_epsLpNum DBL_EPSILON 00033 00034 /* ========================================================================= */ 00035 /** @brief Read from a string a number and store it in the given double, 00036 * @return the number of chars readed from the input string */ 00037 #define dbl_EGlpNumReadStr(a,str) ({\ 00038 int __i =0;\ 00039 sscanf(str,"%lf%n",&(a),&__i);\ 00040 __i;}) 00041 00042 /* ========================================================================= */ 00043 /** @brief given a double, write it to a string (to be allocated internally), 00044 * and return it. */ 00045 #define dbl_EGlpNumGetStr(a) ({\ 00046 char *__str=0;\ 00047 size_t __i=snprintf(__str,(size_t)0,"%.7lg",a);\ 00048 __str = EGsMalloc(char,__i+1);\ 00049 snprintf(__str,__i+1,"%.7lg",a);\ 00050 __str;}) 00051 00052 /* ========================================================================= */ 00053 /** @brief given an array of type double, free it, if the pointer is NULL 00054 * nothing happen. */ 00055 #define dbl_EGlpNumFreeArray(ea) __EGlpNumFreeArray(ea) 00056 00057 /* ========================================================================= */ 00058 /** @brief Reallocate and initialize (if needed) 'size' elements of type 00059 * EGlpNum_t and return it, if no more memory, exit(1) */ 00060 #define dbl_EGlpNumReallocArray(lptr, lsize) ({\ 00061 size_t __csz = (lsize), *__usp = 0;\ 00062 size_t __psz = __EGlpNumArraySize(*lptr);\ 00063 double** __ptr__ = (lptr);\ 00064 if (!__psz) *__ptr__ = dbl_EGlpNumAllocArray (__csz); \ 00065 else if (__psz < __csz) {\ 00066 __usp = (size_t*)(*__ptr__);\ 00067 __usp--;\ 00068 __usp = EGrealloc(__usp, sizeof(double)*__csz+sizeof(size_t));\ 00069 __usp[0] = __csz;\ 00070 *__ptr__ = (double*)(__usp+1);\ 00071 memset((*__ptr__)+__psz,0,sizeof(double)*(__csz-__psz));\ 00072 }\ 00073 *__ptr__;}) 00074 00075 /* ========================================================================= */ 00076 /** @brief Allocate and initialize (if needed) 'size' elements of type double 00077 * and return it, if no more memory, exit(1) */ 00078 #define dbl_EGlpNumAllocArray(size) __EGlpNumAllocArray(double,size) 00079 00080 /* ========================================================================= */ 00081 /** @brief set the given number pointer, set its value to the given double. 00082 * @param var double where we will store the double value. 00083 * @param dbl double value to be stored in 'var'. 00084 * @par Description: 00085 * This function is intended to set initial values to variables; note that the 00086 * double is a number and not a pointer to that value, be carefull with this 00087 * detail. Also, due to implementation details this function can't deal with 00088 * numbers above 1e158 or smaller than 1e-158. Note also that if the number is 00089 * writen in the form \f$x=\bar{x}\cdot 2^e\f$ with \f$0.5<|\bar{x}|<1\f$, 00090 * then \f$\left|x-\frac{p}{q}\right|<2^{e-64}\f$. 00091 * */ 00092 #define dbl_EGlpNumSet(var, dbl) ((var) = (dbl)) 00093 00094 /* ========================================================================= */ 00095 /** @brief Stores in the first number the ceil value of the second number, i.e. 00096 * EGlpNumCeil(a,b) <==> a= ceil(b) */ 00097 #define dbl_EGlpNumCeil(a, b) ((a) = ceil(b)) 00098 00099 /* ========================================================================= */ 00100 /** @brief Stores in the first number the floor value of the second number, i.e. 00101 * EGlpNumFloor(a,b) <==> a= floor(b) */ 00102 #define dbl_EGlpNumFloor(a, b) ((a) = floor(b)) 00103 00104 /* ========================================================================= */ 00105 /** @brief store the (multiplicative) inverse of a number to itself, i.e. 00106 * implement a = 1/a. 00107 * @param a the number to be inverted. */ 00108 #define dbl_EGlpNumInv(a) ((a) = 1.0/(a)) 00109 00110 /* ========================================================================= */ 00111 /** @brief Compare if two numbers are equal within a maximum error. 00112 * @param a EGlpNum_t first number to compare. 00113 * @param b EGlpNum_t second number to compare. 00114 * @return int one in success, zero oterwise. 00115 * @par Description: 00116 * Given two numbers 'a','b' return 1 if a == b, otherwise it return 0 00117 * */ 00118 #define dbl_EGlpNumIsEqqual(a,b) ((a) == (b)) 00119 00120 /* ========================================================================= */ 00121 /** @brief Compare if two numbers are equal within a maximum error. 00122 * @param a EGlpNum_t first number to compare. 00123 * @param b EGlpNum_t second number to compare. 00124 * @param error EGlpNum_t maximum difference allowed between both 00125 * numbers. 00126 * @return int one in success, zero oterwise. 00127 * @par Description: 00128 * Given two numbers 'a','b' and a tolerance 'error', 00129 * return 1 if |a-b|<= error, otherwise it return 0. 00130 * */ 00131 #define dbl_EGlpNumIsEqual(a,b,error) (fabs((a)-(b)) <= (error)) 00132 #define dbl_EGlpNumIsNeq(a,b,error) (((a)-(b) > (error)) || ((b)-(a) > (error))) 00133 #define dbl_EGlpNumIsNeqq(a,b) ((a) != (b)) 00134 #define dbl_EGlpNumIsNeqZero(a,error) (((a) > (error)) || (-(a) > (error))) 00135 #define dbl_EGlpNumIsNeqqZero(a) ((a) != 0.0) 00136 00137 /* ========================================================================= */ 00138 /** @brief test if the first number is bigger to the second number 00139 * @param a EGlpNum_t the first number. 00140 * @param b EGlpNum_t the second number 00141 * @return int one if success, zero otherwise. 00142 * @par Description: 00143 * Given two numbers 'a' and 'b', return one if a < b, zero 00144 * otherwise. 00145 * */ 00146 #define dbl_EGlpNumIsLess(a,b) (a < b) 00147 00148 /* ========================================================================= */ 00149 /** @brief test if the sum of the first two numbers is less thatn the third 00150 * number. 00151 * @param a EGlpNum_t the first number. 00152 * @param b EGlpNum_t the second number 00153 * @param c EGlpNum_t the third number 00154 * @return int one if success, zero otherwise. 00155 * @par Description: 00156 * Given a,b, and c, return nonzero if (a + b < c), zero toherwise. 00157 * */ 00158 #define dbl_EGlpNumIsSumLess(a, b, c) ((a) + (b) < (c)) 00159 00160 /* ========================================================================= */ 00161 /** @brief test if the diference of the first two numbers is less thatn the 00162 * third number. 00163 * @param a EGlpNum_t the first number. 00164 * @param b EGlpNum_t the second number 00165 * @param c EGlpNum_t the third number 00166 * @return int one if success, zero otherwise. 00167 * @par Description: 00168 * Given a,b, and c, return nonzero if (a - b < c), zero toherwise. 00169 * */ 00170 #define dbl_EGlpNumIsDiffLess(a, b, c) ((a) - (b) < (c)) 00171 00172 /* ========================================================================= */ 00173 /** @brief test if the first number is bigger to the second number 00174 * @param a EGlpNum_t the first number. 00175 * @param b double the second number 00176 * @return int one if success, zero otherwise. 00177 * @par Description: 00178 * Given two numbers 'a' and 'b', return one if a < b, zero 00179 * otherwise. 00180 * */ 00181 #define dbl_EGlpNumIsLessDbl(a,b) ((a) < (b)) 00182 00183 /* ========================================================================= */ 00184 /** @brief test if the first number is bigger to the second number 00185 * @param a EGlpNum_t the first number. 00186 * @param b double the second number 00187 * @return int one if success, zero otherwise. 00188 * @par Description: 00189 * Given two numbers 'a' and 'b', return one if a > b, zero 00190 * otherwise. 00191 * */ 00192 #define dbl_EGlpNumIsGreaDbl(a,b) ((a) > (b)) 00193 00194 /* ========================================================================= */ 00195 /** @brief test if the first number is bigger to the second number 00196 * @param a EGlpNum_t the first number. 00197 * @param b EGlpNum_t the second number 00198 * @return int one if success, zero otherwise. 00199 * @par Description: 00200 * Given two numbers 'a' and 'b', return one if a <= b, zero 00201 * otherwise. 00202 * */ 00203 #define dbl_EGlpNumIsLeq(a,b) ((a) <= (b)) 00204 00205 /* ========================================================================= */ 00206 /** @brief copy the value of the second number to the first. 00207 * @param a EGlpNum_t source number (it won't change value). 00208 * @param b EGlpNum_t source number (it won't change value). 00209 * @param den EGlpNum_t denominator of the difference (it won't change value). 00210 * @param dest EGlpNum_t where to store the value . 00211 * @par Description: 00212 * Set dest = (a - b) / den */ 00213 #define dbl_EGlpNumCopyDiffRatio(dest,a, b, den) ((dest) = ((a) - (b)) / (den)) 00214 00215 /* ========================================================================= */ 00216 /** @brief copy the value of the second number to the first. 00217 * @param a EGlpNum_t source number (it won't change value). 00218 * @param b EGlpNum_t source number (it won't change value). 00219 * @param dest EGlpNum_t where to store the value stored in 'orig'. 00220 * @par Description: 00221 * Set dest = a - b */ 00222 #define dbl_EGlpNumCopyDiff(dest,a,b) ((dest) = (a) - (b)) 00223 00224 /* ========================================================================= */ 00225 /** @brief copy the value of the sum of the second and third parameter 00226 * @param a EGlpNum_t source number (it won't change value). 00227 * @param b EGlpNum_t source number (it won't change value). 00228 * @param dest EGlpNum_t where to store the sum. 00229 * @par Description: 00230 * Set dest = a + b */ 00231 #define dbl_EGlpNumCopySum(dest,a,b) ((dest) = (a) + (b)) 00232 00233 /* ========================================================================= */ 00234 /** @brief copy the value of the second number to the first. 00235 * @param orig EGlpNum_t source number (it won't change value). 00236 * @param dest EGlpNum_t where to store the value stored in 'orig'. 00237 * @par Description: 00238 * Given two numbers copy the values in 'orig', into 'dest'. 00239 * */ 00240 #define dbl_EGlpNumCopy(dest,orig) ((dest) = (orig)) 00241 00242 /* ========================================================================= */ 00243 /** @brief change the fist number to the maximum between itself and the 00244 * absolute value of the second. 00245 * @param orig EGlpNum_t source number (it won't change value). 00246 * @param dest EGlpNum_t where to store the value stored in 'orig'. 00247 * @par Description: 00248 * implement dest = max(dest,abs(orig)) 00249 * */ 00250 #define dbl_EGlpNumSetToMaxAbs(dest, orig) if((dest) < fabs(orig)) \ 00251 (dest) = fabs(orig) 00252 #define dbl_EGlpNumSetToMinAbs(dest, orig) if((dest) > fabs(orig)) \ 00253 (dest) = fabs(orig) 00254 00255 /* ========================================================================= */ 00256 /** @brief copy the square of the second argument, divided by the third 00257 * argument into the first argument. 00258 * @param dest EGlpNum_t where to store the result 00259 * @param orig EGlpNum_t second parameter 00260 * @param den EGlpNum_t third parameter 00261 * @par Description: 00262 * compute dest = (orig*orig)/den 00263 * */ 00264 #define dbl_EGlpNumCopySqrOver(dest, orig, den) ((dest) = (orig)*(orig)/(den)) 00265 00266 /* ========================================================================= */ 00267 /** @brief copy the value of the absolute value of the second parameter to the 00268 * first parameter. 00269 * @param orig EGlpNum_t source number (it won't change value). 00270 * @param dest EGlpNum_t where to store the absolute value stored 00271 * in 'orig'. 00272 * @par Description: 00273 * Given a number 'orig', copy its absolute value to 'dest'. i.e. 00274 * dest = |orig| 00275 * */ 00276 #define dbl_EGlpNumCopyAbs(dest,orig) ((dest) = fabs(orig)) 00277 00278 /* ========================================================================= */ 00279 /** @brief copy minus the value of the second parameter to the 00280 * first parameter. 00281 * @param orig EGlpNum_t the source number (it won't change value). 00282 * @param dest EGlpNum_t where to store minus the value stored 00283 * in 'orig'. 00284 * @par Description: 00285 * Given a number 'orig', copy minus the value to 'dest'. i.e. 00286 * dest = -orig 00287 * */ 00288 #define dbl_EGlpNumCopyNeg(dest,orig) ((dest) = -(orig)) 00289 00290 /* ========================================================================= */ 00291 /** @brief Set des = op1/op2. 00292 * @param dest EGlpNum_t where we will store the result. 00293 * @param op1 EGlpNum_t numerator of the fraction (possibly non an integer) 00294 * @param op2 EGlpNum_t denominator of the fraction (possibly non an integer) 00295 * @par Description: 00296 * Set des = op1/op2 00297 * */ 00298 #define dbl_EGlpNumCopyFrac(dest,op1,op2) ((dest) = (op1)/(op2)) 00299 00300 /* ========================================================================= */ 00301 /** @brief copy the first 'size' values in the second array to the first array. 00302 * @param orig EGlpNum_t* pointer to the array from where we will copy the 00303 * values (it won't change value). 00304 * @param dest EGlpNum_t* pointer to where to store the first 'size' values 00305 * stored in 'orig'. 00306 * @param size unsigned int specifying how many values of 'orig' will be copied 00307 * onto 'dest' 00308 * @par Description: 00309 * This function is provided to (possible) make fast copies of arrays of 00310 * numbers, the arrays should be of length at least 'size', and the resulting 00311 * copy is absolutely independent froom the original, any change in one vale of 00312 * one array won't change values on the other array. 00313 * */ 00314 #define dbl_EGlpNumCopyArray(dest,orig,size) memcpy(dest,orig,sizeof(double)*(size)) 00315 00316 /* ========================================================================= */ 00317 /** @brief Sub to a given number the product of two numbers. 00318 * @param a EGlpNum_t the number that we are going to Sub to. 00319 * @param b EGlpNum_t value to be multiplyed. 00320 * @param c EGlpNum_t value to be multiplyed. 00321 * @par Description: 00322 * This function implements a = a - b*c, and clearly don't change the value 00323 * stored in 'b' nor in 'c'. 00324 * */ 00325 #define dbl_EGlpNumSubInnProdTo(a, b, c) ((a) -= (b)*(c)) 00326 00327 /* ========================================================================= */ 00328 /** @brief Add to a given number the product of two numbers. 00329 * @param a EGlpNum_t the number that we are going to add to. 00330 * @param b EGlpNum_t value to be multiplyed. 00331 * @param c EGlpNum_t value to be multiplyed. 00332 * @par Description: 00333 * This function implements a = a + b*c, and clearly don't change the value 00334 * stored in 'b' nor in 'c'. 00335 * */ 00336 #define dbl_EGlpNumAddInnProdTo(a, b, c) ((a) += (b)*(c)) 00337 00338 /* ========================================================================= */ 00339 /** @brief Substract to a given number the value of the second number. 00340 * @param a EGlpNum_t the number that we are going to substract to. 00341 * @param b unsigned int value to be substracted to 'a'. 00342 * @par Description: 00343 * This function implements a = a - b, and clearly don't change the value 00344 * stored in 'b'. 00345 * */ 00346 #define dbl_EGlpNumSubUiTo(a,b) ((a) -= (b)) 00347 00348 /* ========================================================================= */ 00349 /** @brief Add to a given number the value of the second number. 00350 * @param a EGlpNum_t the number that we are going to add to. 00351 * @param b unsigned int value to be added to 'a'. 00352 * @par Description: 00353 * This function implements a = a + b, and clearly don't change the value 00354 * stored in 'b'. 00355 * */ 00356 #define dbl_EGlpNumAddUiTo(a,b) ((a) += (b)) 00357 00358 /* ========================================================================= */ 00359 /** @brief Add to a given number the value of the second number. 00360 * @param a EGlpNum_t the number that we are going to add to. 00361 * @param b EGlpNum_t value to be added to 'a'. 00362 * @par Description: 00363 * This function implements a = a + b, and clearly don't change the value 00364 * stored in 'b'. 00365 * */ 00366 #define dbl_EGlpNumAddTo(a,b) ((a) += (b)) 00367 00368 /* ========================================================================= */ 00369 /** @brief Substract to a given number the value of the second number. 00370 * @param a EGlpNum_t the number that we are going to substract 00371 * from. 00372 * @param b EGlpNum_t value to be substracted to 'a'. 00373 * @par Description: 00374 * This function implements a = a - b, and clearly don't change the value 00375 * stored in 'b'. 00376 * */ 00377 #define dbl_EGlpNumSubTo(a,b) ((a) -= (b)) 00378 00379 /* ========================================================================= */ 00380 /** @brief Multiply a given number by the value of the second number. 00381 * @param a EGlpNum_t the number that we are going to multiply by 00382 * the second number and store the result. 00383 * @param b EGlpNum_t value to be multyply to 'a'. 00384 * @par Description: 00385 * This function implements a = a * b, and clearly don't change the value 00386 * stored in 'b'. 00387 * */ 00388 #define dbl_EGlpNumMultTo(a,b) ((a) *= (b)) 00389 00390 /* ========================================================================= */ 00391 /** @brief Divide a given number by the value of the second number. 00392 * @param a EGlpNum_t the number that we are going to divide by 00393 * the second number and store the result. 00394 * @param b EGlpNum_t value to be divide to 'a'. 00395 * @par Description: 00396 * This function implements a = a / b, and clearly don't change the value 00397 * stored in 'b'. 00398 * */ 00399 #define dbl_EGlpNumDivTo(a,b) ((a) /= (b)) 00400 00401 /* ========================================================================= */ 00402 /** @brief Divide a given number by the value of the second number. 00403 * @param a EGlpNum_t the number that we are going to divide by 00404 * the second number and store the result. 00405 * @param b unsigned int value to be divided to 'a'. 00406 * @par Description: 00407 * This function implements a = a / b, and don't change the value 00408 * stored in 'b'. 00409 * */ 00410 #define dbl_EGlpNumDivUiTo(a,b) ((a) /= (b)) 00411 00412 /* ========================================================================= */ 00413 /** @brief Multiply a given number by the value of the second number. 00414 * @param a EGlpNum_t the number that we are going to multiply by 00415 * the second number and store the result. 00416 * @param b unsigned int value to be multyply to 'a'. 00417 * @par Description: 00418 * This function implements a = a * b, and clearly don't change the value 00419 * stored in 'b'. 00420 * */ 00421 #define dbl_EGlpNumMultUiTo(a,b) ((a) *= (b)) 00422 00423 /* ========================================================================= */ 00424 /** @brief Reset the value of the pointed number to zero. 00425 * @param a EGlpNum_t the value to be set to zero. 00426 * @par Descrpition: 00427 * Reset a to zero, i.e. implements a = 0; 00428 * */ 00429 #define dbl_EGlpNumZero(a) ((a) = 0.0) 00430 00431 /* ========================================================================= */ 00432 /** @brief Reset the value of the pointed number to one. 00433 * @param a EGlpNum_t value to be set to one. 00434 * @par Descrpition: 00435 * Reset a to zero, i.e. implements a = 1; 00436 * */ 00437 #define dbl_EGlpNumOne(a) ((a) = 1.0) 00438 00439 /* ========================================================================= */ 00440 /** @brief Change the sign of the number. 00441 * @param a EGlpNum_t number we will change sign. 00442 * @par Descrpition: 00443 * Change the sign of the given number, i.e. implements a = -a 00444 * */ 00445 #define dbl_EGlpNumSign(a) ((a) = -(a)) 00446 00447 /* ========================================================================= */ 00448 /** @brief return the closest double value of the given pointer number. 00449 * @param a EGlpNum_t number that we will be transformed to double. 00450 * @return double the closest double representation of the given number. 00451 * par Description: 00452 * return the double number closest in value to the value stored in a. 00453 * */ 00454 #define dbl_EGlpNumToLf(a) ((double)a) 00455 00456 /* ========================================================================= */ 00457 /** @brief initialize the internal memory of a given variable */ 00458 #define dbl_EGlpNumInitVar(a) dbl_EGlpNumZero(a) 00459 00460 /* ========================================================================= */ 00461 /** @brief free the internal memory of a given variable */ 00462 #define dbl_EGlpNumClearVar(a) 00463 00464 /* ========================================================================= */ 00465 /** This are the definitions needed to use double numbers within our general 00466 * framework @{ */ 00467 #if EGLPNUM_TYPE==DBL_TYPE 00468 #ifndef EGLPNUM_MAXCONVORDER 00469 #define EGLPNUM_MAXCONVORDER 2U 00470 #endif 00471 #define EGLPNUM_ISFP 1 00472 #define epsLpNum dbl_epsLpNum 00473 #define oneLpNum dbl_oneLpNum 00474 #define zeroLpNum dbl_zeroLpNum 00475 #define EGlpNum_t double 00476 #define EGlpNumAddTo(a,b) dbl_EGlpNumAddTo(a,b) 00477 #define EGlpNumAddUiTo(a,b) dbl_EGlpNumAddUiTo(a,b) 00478 #define EGlpNumAddInnProdTo(a, b, c) dbl_EGlpNumAddInnProdTo(a,b,c) 00479 #define EGlpNumAllocArray(size) dbl_EGlpNumAllocArray(size) 00480 #define EGlpNumCeil(a, b) dbl_EGlpNumCeil(a,b) 00481 #define EGlpNumClearVar(a) dbl_EGlpNumClearVar(a) 00482 #define EGlpNumCopy(dest,orig) dbl_EGlpNumCopy(dest,orig) 00483 #define EGlpNumCopyArray(dest,orig,size) dbl_EGlpNumCopyArray(dest,orig,size) 00484 #define EGlpNumCopyDiff(dest,a,b) dbl_EGlpNumCopyDiff(dest,a,b) 00485 #define EGlpNumCopyDiffRatio(a, b, c, d) dbl_EGlpNumCopyDiffRatio(a,b,c,d) 00486 #define EGlpNumCopySum(dest,a,b) dbl_EGlpNumCopySum(dest,a,b) 00487 #define EGlpNumCopySqrOver(dest,orig,den) dbl_EGlpNumCopySqrOver(dest,orig,den) 00488 #define EGlpNumCopyAbs(dest,orig) dbl_EGlpNumCopyAbs(dest,orig) 00489 #define EGlpNumCopyNeg(dest,orig) dbl_EGlpNumCopyNeg(dest,orig) 00490 #define EGlpNumCopyFrac(dest,op1,op2) dbl_EGlpNumCopyFrac(dest,op1,op2) 00491 #define EGlpNumDivTo(a,b) dbl_EGlpNumDivTo(a,b) 00492 #define EGlpNumDivUiTo(a,b) dbl_EGlpNumDivUiTo(a,b) 00493 #define EGlpNumFloor(a, b) dbl_EGlpNumFloor(a,b) 00494 #define EGlpNumFreeArray(ea) dbl_EGlpNumFreeArray(ea) 00495 #define EGlpNumGetStr(a) dbl_EGlpNumGetStr(a) 00496 #define EGlpNumInitVar(a) dbl_EGlpNumInitVar(a) 00497 #define EGlpNumInv(a) dbl_EGlpNumInv(a) 00498 #define EGlpNumIsDiffLess(a, b, c) dbl_EGlpNumIsDiffLess(a,b,c) 00499 #define EGlpNumIsEqqual(a,b) dbl_EGlpNumIsEqqual(a,b) 00500 #define EGlpNumIsEqual(a,b,error) dbl_EGlpNumIsEqual(a,b,error) 00501 #define EGlpNumIsGreaDbl(a,b) dbl_EGlpNumIsGreaDbl(a,b) 00502 #define EGlpNumIsLessDbl(a,b) dbl_EGlpNumIsLessDbl(a,b) 00503 #define EGlpNumIsLess(a,b) dbl_EGlpNumIsLess(a,b) 00504 #define EGlpNumIsLeq(a,b) dbl_EGlpNumIsLeq(a,b) 00505 #define EGlpNumIsNeq(a,b,error) dbl_EGlpNumIsNeq(a,b,error) 00506 #define EGlpNumIsNeqq(a,b) dbl_EGlpNumIsNeqq(a,b) 00507 #define EGlpNumIsNeqZero(a,error) dbl_EGlpNumIsNeqZero(a,error) 00508 #define EGlpNumIsNeqqZero(a) dbl_EGlpNumIsNeqqZero(a) 00509 #define EGlpNumIsSumLess(a, b, c) dbl_EGlpNumIsSumLess(a,b,c) 00510 #define EGlpNumMultTo(a,b) dbl_EGlpNumMultTo(a,b) 00511 #define EGlpNumMultUiTo(a,b) dbl_EGlpNumMultUiTo(a,b) 00512 #define EGlpNumOne(a) dbl_EGlpNumOne(a) 00513 #define EGlpNumReadStr(a,str) dbl_EGlpNumReadStr(a,str) 00514 #define EGlpNumReallocArray(lptr,size) dbl_EGlpNumReallocArray(lptr,size) 00515 #define EGlpNumSet(var,dbl) dbl_EGlpNumSet(var,dbl) 00516 #define EGlpNumSetToMaxAbs(dest, orig) dbl_EGlpNumSetToMaxAbs(dest,orig) 00517 #define EGlpNumSetToMinAbs(dest, orig) dbl_EGlpNumSetToMinAbs(dest,orig) 00518 #define EGlpNumSign(a) dbl_EGlpNumSign(a) 00519 #define EGlpNumSubTo(a,b) dbl_EGlpNumSubTo(a,b) 00520 #define EGlpNumSubUiTo(a,b) dbl_EGlpNumSubUiTo(a,b) 00521 #define EGlpNumSubInnProdTo(a, b, c) dbl_EGlpNumSubInnProdTo(a,b,c) 00522 #define EGlpNumToLf(a) dbl_EGlpNumToLf(a) 00523 #define EGlpNumZero(a) dbl_EGlpNumZero(a) 00524 #endif 00525 00526 /** @} */ 00527 /* ========================================================================= */ 00528 /** @} */ 00529 #endif