From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4489 invoked by alias); 24 Sep 2009 09:43:52 -0000 Received: (qmail 4433 invoked by uid 48); 24 Sep 2009 09:43:39 -0000 Date: Thu, 24 Sep 2009 09:43:00 -0000 Message-ID: <20090924094339.4432.qmail@sourceware.org> From: "zimmerma+gcc at loria dot fr" To: glibc-bugs@sources.redhat.com In-Reply-To: <20060521003011.2678.jsm28@gcc.gnu.org> References: <20060521003011.2678.jsm28@gcc.gnu.org> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug math/2678] pow returns incorrect results on underflow X-Bugzilla-Reason: CC Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2009-09/txt/msg00065.txt.bz2 ------- Additional Comments From zimmerma+gcc at loria dot fr 2009-09-24 09:43 ------- This is still wrong with glibc 2.9, and with 2.10.1 (development version): pow(-2.225074e-308,3.000000e+00) = 0.000000 (-0 expected) [mpfr -0.000000] pow(-2.225074e-308,1.677722e+07) = 0.000000 (-0 expected) [mpfr -0.000000] pow(-2.225074e-308,1.000000e+10) = 0.000000 (0 expected) [mpfr 0.000000] pow(-2.225074e-308,1.000000e+20) = 0.000000 (0 expected) [mpfr 0.000000] pow(-1.797693e+308,-3.000000e+00) = 0.000000 (-0 expected) [mpfr -0.000000] pow(-1.797693e+308,-1.677722e+07) = 0.000000 (-0 expected) [mpfr -0.000000] pow(-1.797693e+308,-1.000000e+10) = 0.000000 (0 expected) [mpfr 0.000000] pow(-1.797693e+308,-1.000000e+20) = 0.000000 (0 expected) [mpfr 0.000000] Moreover when compiling with -O1 with GCC 4.3.2 (i.e., when constant folding is activated) all tests except the first one are wrong too (but the values computed by MPFR are correct): libc version: 2.10.1 pow(-2.225074e-308,3.000000e+00) = -0.000000 (-0 expected) [mpfr -0.000000] pow(-2.225074e-308,1.677722e+07) = 0.000000 (-0 expected) [mpfr -0.000000] pow(-2.225074e-308,1.000000e+10) = 0.000000 (0 expected) [mpfr 0.000000] pow(-2.225074e-308,1.000000e+20) = 0.000000 (0 expected) [mpfr 0.000000] pow(-1.797693e+308,-3.000000e+00) = 0.000000 (-0 expected) [mpfr -0.000000] pow(-1.797693e+308,-1.677722e+07) = 0.000000 (-0 expected) [mpfr -0.000000] pow(-1.797693e+308,-1.000000e+10) = 0.000000 (0 expected) [mpfr 0.000000] pow(-1.797693e+308,-1.000000e+20) = 0.000000 (0 expected) [mpfr 0.000000] -- http://sourceware.org/bugzilla/show_bug.cgi?id=2678 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.