Floating point performance issue

Vincent Lefevre vincent+gcc@vinc17.org
Mon Dec 26 13:22:00 GMT 2011

On 2011-12-26 12:56:50 +0100, David Brown wrote:
> No, integer arithmetic is well-defined and consistent.

No, with integer arithmetic you can have overflows, which are not
specified and where things can badly fail, just like the Ariane 5


If you try to implement calculations on real numbers in integer
arithmetic instead of floating-point, you will have the same kinds
of problems (if you want to compare 2 approximations, the equality
operator won't work either), except that you will need to handle
more difficulties manually.

Vincent Lefèvre <vincent@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)

More information about the Gcc-help mailing list