- or download this
float x = 226.0;
if( ABS(x-226.0)>0.00000001 ){ printf("ajaja\n"); }
- or download this
perl -V:nvsize -V:nvtype
nvsize='8';
nvtype='double';
- or download this
/* gcc a.c */
#include <stdio.h>
...
printf("2.26*100=%.16lf\n", d);
if( ABS(d-226.0)>=2.842e-14 ){ printf("double-ULP check has ABS er
+ror\n"); } else {printf("double-ULP check OK\n");}
}
- or download this
version=2.260000, newversion=2.270000
2.26*100=226.00000000
...
float-ULP check OK
2.26*100=225.9999999999999700
double-ULP check has ABS error