undefined behavior in GMP 5.1.2

Vincent Lefevre vincent at vinc17.net
Mon Sep 23 02:39:17 CEST 2013


On 2013-09-21 11:57:42 +0200, Marc Glisse wrote:
> >>mul.c:81:31: runtime error: signed integer overflow:
> >>-5260204364771764878 + -5260204364771764878 cannot be represented in
> >>type 'long'
> 
> We don't check for underflow in mpf multiplication, I didn't touch that.
> People should use mpfr ;-)

Shouldn't the test be removed since it is known to be buggy?

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


More information about the gmp-bugs mailing list