My proposal would be two sets of typeclasses and operators for arithmetic.  The 
usual set (+,-,*,/) would assume the usual field properties and give the 
optimizer some leeway.   The other set would be for when you're prescribing 
order of operations (of course the optimizer is always free to optimize things 
in ways that don't change the result) .  But both sets of operations would work 
for both exact and inexact numbers.   

Matt


--- On Tue, 3/10/09, Jonathan S. Shapiro <[email protected]> wrote:

From: Jonathan S. Shapiro <[email protected]>
Subject: [bitc-dev] Overloading arithmetic
To: [email protected]
Date: Tuesday, March 10, 2009, 1:08 AM

An obvious example of an incorrect OpenMP program has just convinced me that FP 
arith ops should not share operators with integer arith ops: FP ops are not 
associative, which interacts with optimizability.
Violent arguments?
shap, from my phone

-----Inline Attachment Follows-----

_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev



      
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to