Help for this page

Select Code to Download


  1. or download this
    perl -MData::IEEE754::Tools=:all -le"$,=qq(\t); map { print $_, ulp($_
    +) } @ARGV" 0.25 0.4 0.5 0.6 0.9 1 1.9 2
    
    0.25    5.55111512312578e-017
    ...
    1       2.22044604925031e-016
    1.9     2.22044604925031e-016
    2       4.44089209850063e-016
    
  2. or download this
    perl -MData::IEEE754::Tools=:all -e"printf qq(%-3d %-32.32s 0x%-16s %.
    +16f %s\n), $_, 1+1/2**$_, hexstr754_from_double(1+1/2**$_), 1+1/2**$_
    +, to_dec_floatingpoint(1+1/2**$_) for @ARGV" 47 48 49 50 51 52 53 54 
    +55 56
    
    ...
    54  1                                0x3FF0000000000000 1.000000000000
    +0000 +0d1.0000000000000000p+0000
    55  1                                0x3FF0000000000000 1.000000000000
    +0000 +0d1.0000000000000000p+0000
    56  1                                0x3FF0000000000000 1.000000000000
    +0000 +0d1.0000000000000000p+0000
    
  3. or download this
    perl -MData::IEEE754::Tools=:all -e"printf qq(%-3d %-32.32s 0x%-16s %.
    +16f %s\n), $_, 0.5+1/2**$_, hexstr754_from_double(0.5+1/2**$_), 0.5+1
    +/2**$_, to_dec_floatingpoint(0.5+1/2**$_) for @ARGV" 47 48 49 50 51 5
    +2 53 54 55 56
    47  0.500000000000007                0x3FE0000000000040 0.500000000000
    +0071 +0d1.0000000000000142p-0001
    ...
    54  1                                0x3FF0000000000000 1.000000000000
    +0000 +0d1.0000000000000000p+0000
    55  1                                0x3FF0000000000000 1.000000000000
    +0000 +0d1.0000000000000000p+0000
    56  1                                0x3FF0000000000000 1.000000000000
    +0000 +0d1.0000000000000000p+0000