/[gcl]/gcl/o/num_co.c
ViewVC logotype

Diff of /gcl/o/num_co.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by camm, Sat Jul 20 07:10:55 2002 UTC revision 1.6 by camm, Thu Oct 17 01:40:56 2002 UTC
# Line 1363  init_num_co(void) Line 1363  init_num_co(void)
1363     and then passing it to a function.     and then passing it to a function.
1364  */  */
1365    
1366    #ifdef IEEEFLOAT
1367     {
1368       double div,td;
1369       float ts;
1370       for (float_epsilon=1.0,div=0.5;(float)div!=1.0;div=1.0-(0.5*(1.0-div)))
1371         for (ts=float_epsilon;FMEM(ts),!SF_EQL((float)(1.0+ts),(float)1.0);float_epsilon=ts,ts*=div);
1372    
1373       for (float_negative_epsilon=1.0,div=0.5;(float)div!=1.0;div=1.0-(0.5*(1.0-div)))
1374         for (ts=float_negative_epsilon;FMEM(ts),!SF_EQL((float)(1.0-ts),(float)1.0);float_negative_epsilon=ts,ts*=div);
1375    
1376       for (double_epsilon=1.0,div=0.5;(double)div!=1.0;div=1.0-(0.5*(1.0-div)))
1377         for (td=double_epsilon;FMEM(td),!LF_EQL((double)(1.0+td),(double)1.0);double_epsilon=td,td*=div);
1378    
1379       for (double_negative_epsilon=1.0,div=0.5;(double)div!=1.0;div=1.0-(0.5*(1.0-div)))
1380         for (td=double_negative_epsilon;FMEM(td),!LF_EQL((double)(1.0-td),(double)1.0);double_negative_epsilon=td,td*=div);
1381    
1382     }
1383    #else
1384    
1385  #define SMALL 1.05        #define SMALL 1.05      
1386          for (float_epsilon = 1.0;          for (float_epsilon = 1.0;
1387               FMEM(float_epsilon),!SF_EQL((float)(1.0 + float_epsilon),(float)1.0);               FMEM(float_epsilon),!SF_EQL((float)(1.0 + float_epsilon),(float)1.0);
# Line 1391  init_num_co(void) Line 1410  init_num_co(void)
1410          while(LF_EQL(1.0 - double_negative_epsilon , 1.0))          while(LF_EQL(1.0 - double_negative_epsilon , 1.0))
1411            double_negative_epsilon=double_negative_epsilon*SMALL;            double_negative_epsilon=double_negative_epsilon*SMALL;
1412            ;            ;
1413            #endif
1414    
1415          make_constant("MOST-POSITIVE-SHORT-FLOAT",          make_constant("MOST-POSITIVE-SHORT-FLOAT",
1416                        make_shortfloat(biggest_float));                        make_shortfloat(biggest_float));

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26