Calculators on desktops (was Re: Octal)

der Mouse mouse at Rodents.Montreal.QC.CA
Fri Sep 1 22:45:47 CDT 2006

> It has non-integer math support for decimal, but they left it off of
> the other bases.

Lazy indeed.

>> I have never seen a hex number with a decimal point anyway...

Nor will you; as Fred already pointed out, it's a hexadecimal point.
That aside, they do exist, though they're rare.  While practically
everything these days uses IEEE floating-point, which is binary-based,
there have been machines with floating-point arithmetic that worked in
other bases, like octal or hex.  For them, speaking of the "decimal"
point in a number printed in hex notation makes perfect sense.

> As quick exercises, 1) what is the binary fraction for PI?

% calc
1> const(pi)
$1 = 3.141592653589793238462643383279502884197169399375105820974944592
2> cvt($$,2)
$2 = #b11.00100100001111110110101010001000100001011010001100001000110101

Something seems broken in my computation of pi for high precision
values; when I try to use base 2 and 1023-"digit" precision, I get a
negative number(!).  But computing pi to 64-"digit" precision in base
255 (the highest that calculator program supports) and then converting
to binary gives


of which I'd recommend not trusting the low dozen or so bits.

> 2) what is the IEEE 32 bit floating point bit pattern for PI?


Sign bit 0, indicating positive.
Excess-127 exponent 128 (unbiased exponent 1, value in [2,4)).
Mantissa (1.)10010010000111111011011, rounded up from ...010 10100....

> 3) Who is attributed with "God created the integers, all else is the
> work of man"?

Leopold Kronecker, of Kronecker delta fame, I think it is.

I'm not entirely sure I agree with it, but then, I'm not sure to what
extent I'm a Platonist, so....

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse at
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

More information about the cctech mailing list