Some comments relating to ICFP contest Andre van Tonder (25 Jul 2006 20:25 UTC)
Re: Some comments relating to ICFP contest Alex Shinn (26 Jul 2006 02:04 UTC)
Re: Some comments relating to ICFP contest Michael Sperber (26 Jul 2006 05:03 UTC)
Re: Some comments relating to ICFP contest Alan Watson (26 Jul 2006 08:40 UTC)
Re: Some comments relating to ICFP contest Michael Sperber (26 Jul 2006 09:02 UTC)
Re: Some comments relating to ICFP contest bear (04 Sep 2006 17:31 UTC)
Re: Some comments relating to ICFP contest Andre van Tonder (26 Jul 2006 15:12 UTC)
Re: Some comments relating to ICFP contest Michael Sperber (26 Jul 2006 15:35 UTC)
Re: Some comments relating to ICFP contest Andre van Tonder (26 Jul 2006 16:23 UTC)
Re: Some comments relating to ICFP contest Michael Sperber (27 Jul 2006 15:51 UTC)

Re: Some comments relating to ICFP contest bear 04 Sep 2006 17:31 UTC


On Wed, 26 Jul 2006, Alan Watson wrote:

> Consider data types with 32 bits and 64 bits but which are not
> numbers in the sense that the generic arithmetic operations cannot
> be used with them without an explicit conversion. Appropriate type-
> specific arithmetic and logical operations could be defined for
> these types. This would not be especially difficult to implement in
> a well-designed Scheme.

I agree with this.  Once you're worried about exact width in
bits you're not using them as numbers any more.  They are
bitfields, and they have a beginning and an end.

There should be "bitmath" operators that do (well-defined modular)
math on bitfields assuming particular binary representations of
numbers, to the same extent that there should be "bitstring"
operations that do well-defined character-manipulation operations on
bitfields assuming particular binary representations of strings.

But we should not guarantee errors in the math routines we use on
(generic) numbers; an overflow or roundoff error is just that, an
error, and the standard ought never prohibit an implementor from
trying to avoid errors. Nor should we ever guarantee that certain
values cannot be represented as numbers, because once again that
puts the standard in the position of requiring errors.

				Bear