glibc/sysdeps
Joseph Myers 2e3d0de31f Fix ulps regeneration for *-finite tests.
On running tests after from-scratch ulps regeneration, I found that
some libm tests failed with ulps in excess of those recorded in the
from-scratch regeneration, which should never happen unless those ulps
exceed the limit on ulps that can go in libm-test-ulps files.

Failure: Test: atan2_upward (inf, -inf)
Result:
 is:          2.35619498e+00   0x1.2d97ccp+1
 should be:   2.35619450e+00   0x1.2d97c8p+1
 difference:  4.76837159e-07   0x1.000000p-21
 ulp       :  2.0000
 max.ulp   :  1.0000
Maximal error of `atan2_upward'
 is      : 2 ulp
 accepted: 1 ulp
Failure: Test: carg_upward (-inf + inf i)
Result:
 is:          2.35619498e+00   0x1.2d97ccp+1
 should be:   2.35619450e+00   0x1.2d97c8p+1
 difference:  4.76837159e-07   0x1.000000p-21
 ulp       :  2.0000
 max.ulp   :  1.0000
Maximal error of `carg_upward'
 is      : 2 ulp
 accepted: 1 ulp

The problem comes from the addition of tests for the finite-math-only
versions of libm functions.  Those tests share ulps with the default
function variants.  make regen-ulps runs the default tests before the
finite-math-only tests, concatenating the resulting ulps before
feeding them to gen-libm-test.pl to generate a new libm-test-ulps
file.  But gen-libm-test.pl always takes the last ulps value given for
any (function, type) pair.  So, if the largest ulps for a function
come from non-finite inputs, a from-scratch regeneration loses those
ulps.

This patch fixes gen-libm-test.pl, in the case where there are
multiple ulps values for a (function, type) pair - which can only
happen as part of a regeneration - to take the largest ulps value
rather than the last one.

Tested for ARM / MIPS / powerpc-nofpu.

	* math/gen-libm-test.pl (parse_ulps): Do not reduce
	already-recorded ulps.
	* sysdeps/arm/libm-test-ulps: Regenerated.
	* sysdeps/mips/mips32/libm-test-ulps: Likewise.
	* sysdeps/mips/mips64/libm-test-ulps: Likewise.
	* sysdeps/powerpc/nofpu/libm-test-ulps: Likewise.
2016-01-19 21:42:58 +00:00
..
aarch64 Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
alpha Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
arm Fix ulps regeneration for *-finite tests. 2016-01-19 21:42:58 +00:00
generic S/390: Do not raise inexact exception in lrint/lround. [BZ #19486] 2016-01-18 12:48:06 +01:00
gnu Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
hppa hppa: fix dladdr [BZ #19415] 2016-01-08 02:19:26 -05:00
i386 Make shebang interpreter directives consistent 2016-01-07 04:03:21 -05:00
ia64 Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
ieee754 S/390: Do not raise inexact exception in lrint/lround. [BZ #19486] 2016-01-18 12:48:06 +01:00
init_array Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
m68k Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
mach Update copyright dates committed in 2016 2016-01-06 14:03:10 -08:00
microblaze Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
mips Fix ulps regeneration for *-finite tests. 2016-01-19 21:42:58 +00:00
nacl Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
nios2 Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
nptl New pthread_barrier algorithm to fulfill barrier destruction requirements. 2016-01-15 21:20:34 +01:00
posix Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
powerpc Fix ulps regeneration for *-finite tests. 2016-01-19 21:42:58 +00:00
pthread Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s390 S390: Regenerate ULPs 2016-01-19 10:02:44 +01:00
sh Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
sparc New pthread_barrier algorithm to fulfill barrier destruction requirements. 2016-01-15 21:20:34 +01:00
tile Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
unix sparc: mman.h: fix bad comment insertion 2016-01-16 02:34:15 -05:00
wordsize-32 Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
wordsize-64 Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
x86 Set index_Fast_Unaligned_Load for Excavator family CPUs 2016-01-14 08:14:31 -08:00
x86_64 Fixed build with assembler w/o AVX-512 support. 2016-01-19 14:34:53 +03:00