My comments Marcin 'Qrczak' Kowalczyk (19 Oct 2005 18:37 UTC)
Re: My comments Bradd W. Szonye (19 Oct 2005 19:17 UTC)
Re: My comments Thomas Bushnell BSG (19 Oct 2005 19:44 UTC)
Re: My comments Bradd W. Szonye (19 Oct 2005 19:55 UTC)
Re: My comments Thomas Bushnell BSG (19 Oct 2005 20:11 UTC)
Re: My comments John.Cowan (19 Oct 2005 20:10 UTC)
Re: My comments Thomas Bushnell BSG (19 Oct 2005 20:13 UTC)
Re: My comments Bradd W. Szonye (19 Oct 2005 20:25 UTC)
Re: My comments Marcin 'Qrczak' Kowalczyk (19 Oct 2005 20:23 UTC)
Re: My comments Bradd W. Szonye (19 Oct 2005 20:36 UTC)
Re: My comments Marcin 'Qrczak' Kowalczyk (19 Oct 2005 21:36 UTC)
Re: My comments Bradd W. Szonye (19 Oct 2005 21:42 UTC)
Re: My comments Bradd W. Szonye (19 Oct 2005 22:08 UTC)
Exactness (was Re: My comments) bear (20 Oct 2005 01:50 UTC)
Re: Exactness Thomas Bushnell BSG (20 Oct 2005 03:45 UTC)
Re: Exactness Marcin 'Qrczak' Kowalczyk (20 Oct 2005 09:13 UTC)
Re: Exactness Bradd W. Szonye (20 Oct 2005 20:15 UTC)
Re: Exactness bear (20 Oct 2005 22:09 UTC)
Re: Exactness Marcin 'Qrczak' Kowalczyk (21 Oct 2005 02:08 UTC)
Re: Exactness Thomas Bushnell BSG (21 Oct 2005 03:05 UTC)
Re: Exactness Marcin 'Qrczak' Kowalczyk (21 Oct 2005 08:15 UTC)
Re: Exactness Thomas Bushnell BSG (21 Oct 2005 18:38 UTC)
Re: Exactness Marcin 'Qrczak' Kowalczyk (21 Oct 2005 20:12 UTC)
Re: Exactness Thomas Bushnell BSG (21 Oct 2005 20:29 UTC)
Re: Exactness Marcin 'Qrczak' Kowalczyk (21 Oct 2005 20:38 UTC)
Re: Exactness Thomas Bushnell BSG (21 Oct 2005 20:44 UTC)
Re: Exactness Marcin 'Qrczak' Kowalczyk (21 Oct 2005 21:20 UTC)
Re: Exactness Thomas Bushnell BSG (21 Oct 2005 21:44 UTC)
Re: Exactness Marcin 'Qrczak' Kowalczyk (21 Oct 2005 22:18 UTC)
Re: Exactness Thomas Bushnell BSG (21 Oct 2005 22:48 UTC)
Re: Exactness Marcin 'Qrczak' Kowalczyk (22 Oct 2005 00:34 UTC)
Re: Exactness Thomas Bushnell BSG (22 Oct 2005 01:02 UTC)
Re: Exactness Per Bothner (22 Oct 2005 00:59 UTC)

Re: Exactness Thomas Bushnell BSG 21 Oct 2005 03:05 UTC

Marcin 'Qrczak' Kowalczyk <xxxxxx@knm.org.pl> writes:

> I know what to expect from IEEE floats. I know for example that
> calculations in a certain range of integers are exact. Or that numbers
> have the same relative precision but different absolute precision, for
> a wide range of magnitudes. Or that certain primitive operations take
> constant time, and a number uses a fixed amount of memory - it doesn't
> keep growing precision. I should be able to know more in Scheme - for
> example that by default a flonum overflow will not be fatal but will
> yield +inf.0, which will compare as greater than any other number
> except itself and +nan.0.
>
> I know what to expect from ratios.
>
> I don't know what to expect from inexact real numbers. Do they behave
> like floats, or like ratios with inexactness bit? It does matter!

So we need a way to query those questions.  Scheme doesn't have
"flonums" and that's a good and rational design choice.  We don't want
to bundle extra meaning in with "inexact real", and start making
guarantees about them which have nothing to do with real or exact, but
are simply artifacts of traditional implementations.

But what you want is still sensible, of course.  It's not a property
of a value that it has a fixed size (after all *all* values, all
bignums have a fixed size).  That's a property of *operations*, as
your language suggests.

So if you want an implementation of + that is guaranteed not to use
more memory in the result than in the operands, we can have that.  No
problem.  Such a function should also have optional arguments that
specify what happens if the result doesn't fit in the space needed.

Thomas