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); |
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)); |