Help for this page

Select Code to Download


  1. or download this
    package FixedPoint;
    # simplistic module for adding and halving stringified
    ...
    printf "Math:       %-16d = should start at ceil(-log10(x))-th digit a
    +fter decimal point\n", my $d = ceil(-log10($tiny));
    printf "Math:       %-16d = total number of digits after decimal shoul
    +d be the lowest power of two = ceil(-log2(ulp(x)))\n", my $e = ceil(-
    +log2(ulp($tiny)));
    printf "Math:       %-16d = Number of significant digits", $e - $d + 1
    +;
    
  2. or download this
    __RESULTS__
    ------------------------------------------------------
    ...
    Math:       308              = should start at ceil(-log10(x))-th digi
    +t after decimal point
    Math:       1074             = total number of digits after decimal sh
    +ould be the lowest power of two = ceil(-log2(ulp(x)))
    Math:       767              = Number of significant digits