Walter Bright wrote:
Don wrote:
Integer expressions remain inexact until there's a cast.

(It's very simple to implement, you just use the integer range code, adding an 'inexact' flag. Division sets the flag, casts clear the flag, everything else just propagates it if a unary operation, or ORs the two flags if a binary operation).

That sounds like a very good idea.

I think the same (though I personally am not liable because it's been burned in my brain to always add ".0" to FP-involved literals). It's an improvement in the same vein as value range propagation.

Should we make this part of the language, or as a quality of implementation issue? I prefer the former, because the latter means that code compiles on one machine and doesn't on another.


Andrei

Reply via email to