[clean-list] Int laws (was:Re: exceptions again ...)
Ronny Wichers Schreur
ronny@cs.kun.nl
Thu, 29 Jan 2004 17:44:47 +0100
Erik Zuurbier writes (to the Clean discussion list):
>Classical + seems to be commutative even for limited
>precision integers, but various 'laws' don't hold for them.
>For instance: a+b-a is not generally equivalent to a-a+b,
>notably as a approaches the largest integer that can be
>represented.
>
It's not that grim. If you keep to laws with +, -, 0, *, 1
and equality you're fine. The troubles start with comparison
operators and /.
Cheers,
Ronny Wichers Schreur