Doxygen Source Code Documentation
eis_epslon.c
Go to the documentation of this file.00001 /* epslon.f -- translated by f2c (version 19961017). 00002 You must link the resulting object file with the libraries: 00003 -lf2c -lm (in that order) 00004 */ 00005 00006 #include "f2c.h" 00007 00008 doublereal epslon_(doublereal *x) 00009 { 00010 /* System generated locals */ 00011 doublereal ret_val, d__1; 00012 00013 /* Local variables */ 00014 static doublereal a, b, c__, eps; 00015 00016 00017 /* ESTIMATE UNIT ROUNDOFF IN QUANTITIES OF SIZE X. */ 00018 00019 00020 /* THIS PROGRAM SHOULD FUNCTION PROPERLY ON ALL SYSTEMS */ 00021 /* SATISFYING THE FOLLOWING TWO ASSUMPTIONS, */ 00022 /* 1. THE BASE USED IN REPRESENTING FLOATING POINT */ 00023 /* NUMBERS IS NOT A POWER OF THREE. */ 00024 /* 2. THE QUANTITY A IN STATEMENT 10 IS REPRESENTED TO */ 00025 /* THE ACCURACY USED IN FLOATING POINT VARIABLES */ 00026 /* THAT ARE STORED IN MEMORY. */ 00027 /* THE STATEMENT NUMBER 10 AND THE GO TO 10 ARE INTENDED TO */ 00028 /* FORCE OPTIMIZING COMPILERS TO GENERATE CODE SATISFYING */ 00029 /* ASSUMPTION 2. */ 00030 /* UNDER THESE ASSUMPTIONS, IT SHOULD BE TRUE THAT, */ 00031 /* A IS NOT EXACTLY EQUAL TO FOUR-THIRDS, */ 00032 /* B HAS A ZERO FOR ITS LAST BIT OR DIGIT, */ 00033 /* C IS NOT EXACTLY EQUAL TO ONE, */ 00034 /* EPS MEASURES THE SEPARATION OF 1.0 FROM */ 00035 /* THE NEXT LARGER FLOATING POINT NUMBER. */ 00036 /* THE DEVELOPERS OF EISPACK WOULD APPRECIATE BEING INFORMED */ 00037 /* ABOUT ANY SYSTEMS WHERE THESE ASSUMPTIONS DO NOT HOLD. */ 00038 00039 /* THIS VERSION DATED 4/6/83. */ 00040 00041 a = 1.3333333333333333; 00042 L10: 00043 b = a - 1.; 00044 c__ = b + b + b; 00045 eps = (d__1 = c__ - 1., abs(d__1)); 00046 if (eps == 0.) { 00047 goto L10; 00048 } 00049 ret_val = eps * abs(*x); 00050 return ret_val; 00051 } /* epslon_ */ 00052