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