Re: The spinoza papers: design of the extra-precision number object 2
- From: Richard Heathfield <rjh@xxxxxxxxxxxxxxx>
- Date: Fri, 23 May 2008 15:39:17 +0000
spinoza1111 said:
On May 23, 4:30 pm, "kwikius" <a...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
<snip>
I'm interested in the rationale behind representing integers and reals
together within one type.
To me the useage of the 2 types is distinct. A real is a digital
approximation to an analogue quantity, IOW a physical quantity or a
ratio of 2 quantities. This has an interesting consequence in that the
representation should be constant and it should be accepted that the
approximation will be truncated to some arbitrary point (either a fixed
constant in the language, or supplied parametrically). The alternative
is that we get the distinct possibility to get an approximation that
doesnt terminate, which cause practical problems, e.g in representation
of pi.
But many "real" values are also exact. I can make a block of wood
exactly 1.23 inches long, can't I?
I doubt very much whether even a highly skilled carpenter could do so,
except by a stupendous fluke. The "real" world is not kind to those who
like exact measurements. When we're counting, we can be reasonably sure
(if we count carefully) that we have an exact number. But when we're
measuring, there comes a point (which varies depending on what we're
measuring and what we're using to measure it) at which we must admit that
we're guessing. It might be a good guess. It might even be a very good
guess. But a guess it remains.
You raise an interesting point. If physically we can't really ensure
that the block is 1.23 inches long, then sure, a bounded
representation at least tells us, indirectly to be certain, not to
imagine we have the "exact" value.
That's correct. In fact, we can go a little further than that, and say that
the exact value lies within a range of values. How wide that range is will
depend, again, on what we're measuring and what we're using to measure it
(and to no small extent on who is doing the measuring - for a low
tolerance, obviously we'd prefer a skilled operator with good health, a
good eye, a steady hand, and no distractions).
<snip>
But wouldn't it be best not to have to do numerical analysis and have
the computer spin out the mantissa and exponent to unlimited
"lengths", perhaps by systematically modifying the base such that
hyperlarge numbers are represented say by offsets to powers of two, or
powers of powers?
There comes a point (and for many real world situations it was reached long
ago) when the precision offered by the computer exceeds the accuracy of
the data. Take your wooden block, for example. A PC can easily record the
length of the block as 1.2300000000 inches without our even having to
invent an extra-precision type - but we would be unwise to trust that the
block has been measured to an accuracy of +/- 5/100000000000 inches.
<snip>
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
.
- Follow-Ups:
- Re: The spinoza papers: design of the extra-precision number object 2
- From: James Dow Allen
- Re: The spinoza papers: design of the extra-precision number object 2
- From: spinoza1111
- Re: The spinoza papers: design of the extra-precision number object 2
- From: kwikius
- Re: The spinoza papers: design of the extra-precision number object 2
- References:
- The spinoza papers: design of the extra-precision number object 2
- From: spinoza1111
- Re: The spinoza papers: design of the extra-precision number object 2
- From: kwikius
- Re: The spinoza papers: design of the extra-precision number object 2
- From: spinoza1111
- The spinoza papers: design of the extra-precision number object 2
- Prev by Date: Re: The spinoza papers: towards a theory of progress reporting
- Next by Date: Re: The spinoza papers: towards a theory of progress reporting
- Previous by thread: Re: The spinoza papers: design of the extra-precision number object 2
- Next by thread: Re: The spinoza papers: design of the extra-precision number object 2
- Index(es):
Relevant Pages
|
Loading