Help for this page

Select Code to Download


  1. or download this
        float x = 226.0;
        if( ABS(x-226.0)>0.00000001 ){ printf("ajaja\n"); }
    
  2. or download this
    perl -V:nvsize -V:nvtype
    nvsize='8';
    nvtype='double';
    
  3. 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");}
    }
    
  4. 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