On 2008-01-03 21:52:31 -0500, Kaveh R. GHAZI wrote: > On Wed, 2 Jan 2008, Vincent Lefevre wrote: > > See the new bug fixed in r5162 (for the 2.3 branch). mpfr_gamma on > > -1000000001.5 will give you -0 instead of +0. > > So I tried that, but mpfr_gamma on that value sets the global underflow > flag. If overflow/underflow are set by mpfr, GCC will intentionally > bypass folding. So this particular case is not something I can use.
OK, I forgot that. > I don't know if this mpfr case should be setting the underflow flag or if > it's a bug. It's really an underflow, and the bug (wrong sign) can occur only if there's an underflow. > Calling the glibc tgamma doesn't seem to think it underflowed > when looking at fetestexcept(). vin:~> gp Reading GPRC: /home/vlefevre/.gprc ...Done. GP/PARI CALCULATOR Version 2.3.2 (released) i486 running linux (ix86/GMP-4.2.1 kernel) 32-bit version compiled: Apr 13 2007, gcc-4.1.2 20061115 (prerelease) (Debian 4.1.1-21) (readline v5.2 enabled, extended help available) Copyright (C) 2000-2006 The PARI Group PARI/GP is free software, covered by the GNU General Public License, and comes WITHOUT ANY WARRANTY WHATSOEVER. Type ? for help, \q to quit. Type ?12 for how to get moral (and possibly technical) support. parisize = 4000000, primelimit = 500000 ? gamma(-1000000001.5) *** gamma: exponent (expo) overflow ? gamma(-10000001.5) %1 = 8.262136614106674385317743887 E-65657070 -- Vincent Lefèvre <[EMAIL PROTECTED]> - Web: <http://www.vinc17.org/> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/> Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)