We have a winner! (very nicely done!)
It shall be your responsibility to answer for
Andrew B <aliensrcooluk at yahoo.co.uk> 's
next query topic, and seeing to it that he follows this.
Are the details of the Pentium 1's FDIV problem on-topic?
I wish that down-sizing hadn't taken away teaching the
computer math class!
--
Grumpy Ol' Fred cisin at
xenosoft.com
http://merritt.edu/~fcisin
On Fri, 1 Sep 2006, der Mouse wrote:
LAZY.
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
#b11.0010010000111111011010101000100010000101101000110000100011010011000100110001100110001010001011100000001101110000011100110100010010100100000010010011100000100010001010011001111100110001110100000000100000101110111110101001100011101100010011100110110010001001010001010010100000100001111001100011100011010000000100110111011110111110010101000110011011001111001101001110100100001100011011001100000010101100001010011011011111001001011111000101000011011101001111111000010011010101101101011011010101000111000010000110110110110101101111011010111111010111011101001110011100001011111110011010001000000110010010111101001100110010101010111011010010010111010010001110111110110011100001000111100011001010010000001000001001001101000000100101011001000110101110100101010000010011101111110100101110011100001101010011110100010111100100010010000101001110010010111011000111100111001100010001101110101001000110101000000000100111001100011111001001111110000110100001001100101011110010100100000001101000011111!
11!
11!
11100101110111101101100001
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?
01000000010010010000111111011011
0
Sign bit 0, indicating positive.
10000000
Excess-127 exponent 128 (unbiased exponent 1, value in [2,4)).
10010010000111111011011
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 rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B