[m-rev.] Added int:'/'/2 and builtin false/0

Ralph Becket rafe at cs.mu.OZ.AU
Mon May 20 13:26:28 AEST 2002


Michael Day, Friday, 17 May 2002:
> 
> > Well, floating point division is not guaranteed to satisfy
> > X * (Y / X) = Y, so perhaps we should have a special name for that, too?
> 
> ints of limited size can wrap around, so X + 1 < X => 1 < 0
> 
> Similarly with subtraction... I propose we rename all the integer
> operators taking advantage of Mercury's ability to quote identifiers:
> 
> Y = X '+ (this may wrap around)' 1
> Z = Y '/ (this truncates and is not exact)' X
> 
> That way the programmer can't possibly get it wrong, and will not be able 
> to make the kind of stupid integer/float/rounding/truncation assumptions 
> that led to the failed Arianne 5, for example.

Amidst all the sarcasm, I can't tell which way you're leaning :)

- Ralph
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list