Hacker News new | ask | show | jobs
by jabl 2167 days ago
> Fortran predictably overflows the result

Not sure what you mean here, and I don't have the standard at hand ATM, but I'm quite sure this is undefined behaviour in Fortran.

But yes, I agree defined behaviour is good. Undefined behaviour is occasionally good for optimization, at the cost of gray hairs for users.

1 comments

Standard? True, undefined. Compilers, however, happily overflow unless you tell them to catch it at run time. So, my original statement is at least half false. :)