Re: Proposal: 6NF

From: David Cressey <dcressey_at_verizon.net>
Date: Thu, 12 Oct 2006 11:49:30 GMT
Message-ID: <eZpXg.5487$9Y1.3265_at_trndny03>


"Brian Selzer" <brian_at_selzer-software.com> wrote in message news:Ig7Xg.21738$Ij.16494_at_newssvr14.news.prodigy.com...

> They still don't. It's not possible to represent every irrational number
as
> a finite sequence of digits or bits, and there are an infinite number of
> irrational numbers. Those that have special significance, such as pi or
e,
> could possibly be represented using special values, but the majority must
> still be represented as approximations.

That's not true. The character string "pi" can represent a number, and it only takes 16 bits to represent, at eight bits to a character. Likewise, the character string "sqrt(2)" can represent an irrational number in a finite number of bits.
I know I'm taking your words out of context, but in this case it's both deliberate and legitimate.

>
> > There were one or two such computers, but they were uneconomical in
> > practical terms.
> >
>
> I would be interested to know how they did it.
>

It's very simple, really. Like many other floating point schemes of the time, you have three fields, namely sign, exponent, and mantissa. Let me skip over negative numbers for the moment.

For positive integers, you arrange it so that an exponent of zero shifts the binary point from the left of the mantissa to the right of it. Hence sign=0, exponent=0, mantissa=23 represents the integer 23. Bitwise, it looks just like the representation of integer 23.

Negative numbers are straightforward. Just take the twos complement of the whole shebang.

Now you need a way to represent negative exponents in a positive number. Just take the twos complement of the exponent field. This is simple to state, but it gets awfully messy in practice. And I suspect these floating point numbers are even worse than most when it comes to round off problems. Received on Thu Oct 12 2006 - 13:49:30 CEST

Original text of this message