[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#727841: powl() inaccurate but only at runtime



On Sun, Oct 27, 2013 at 03:57:14PM +0000, Zefram wrote:
> Version: 2.13-38

The current version of libc6 is 2.17-93.

> On amd64, powl() is generating inaccurate results when called at runtime,
> but if a call to it gets constant-folded at compile time (by gcc 4.7)
> then the constant-folded result is much more accurate.

The current version of gcc used by the main architectures is 4.8.

> $ gcc t0.c -lm
> $ echo | ./a.out
> 0x8.5f0468293f0ebc30p-993
> 0x8.5f0468293f0eb4e0p-993

| $ gcc-4.8 -o t0 -Wall -W -O2 t0.c -lm
| $ echo | ./t0                        
| 0x8.5f0468293f0eb4e0p-993
| 0x8.5f0468293f0eb4e0p-993

Bastian

-- 
We Klingons believe as you do -- the sick should die.  Only the strong
should live.
		-- Kras, "Friday's Child", stardate 3497.2


Reply to: