<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/glibc.git/math, branch hjl/pr17841/master</title>
<subtitle>sourceware.org: git/glibc.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/'/>
<entry>
<title>Compile archives with -fno-pie</title>
<updated>2015-05-28T13:08:28+00:00</updated>
<author>
<name>H.J. Lu</name>
<email>hjl.tools@gmail.com</email>
</author>
<published>2015-03-02T22:53:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=ca1f728cbefd6955735087e45d80620113623b3b'/>
<id>ca1f728cbefd6955735087e45d80620113623b3b</id>
<content type='text'>
When compiler defaults to PIE, we compile archives with -fno-pie.   Since
archives won't be used with PIE, compile them with -fpie isn't necessary.

	[BZ #17841]
	* Makeconfig (no-pie-ccflag): New.  Set to -fno-pie.
	(pic-default): Don't define if $(no-pie-ccflag) is -fno-pie.
	(test-object-suffix): New.
	* Makerules (archive-objects): New.  Set before including
	extra-lib.mk.
	($(archive-objects)): New. New rule to append $(no-pie-ccflag)
	to CFLAGS.
	* extra-lib.mk (archive-objects): New.
	* crypt/Makefile ($(objpfx)md5test): Replace ".o" with
	$(test-object-suffix).
	($(objpfx)md5test-giant): Likewise.
	($(objpfx)sha256test): Likewise.
	($(objpfx)sha512test): Likewise.
	* math/Makefile (LDFLAGS-atest-exp): New.
	(LDFLAGS-atest-sincos): Likewise.
	(LDFLAGS-atest-exp2): Likewise.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When compiler defaults to PIE, we compile archives with -fno-pie.   Since
archives won't be used with PIE, compile them with -fpie isn't necessary.

	[BZ #17841]
	* Makeconfig (no-pie-ccflag): New.  Set to -fno-pie.
	(pic-default): Don't define if $(no-pie-ccflag) is -fno-pie.
	(test-object-suffix): New.
	* Makerules (archive-objects): New.  Set before including
	extra-lib.mk.
	($(archive-objects)): New. New rule to append $(no-pie-ccflag)
	to CFLAGS.
	* extra-lib.mk (archive-objects): New.
	* crypt/Makefile ($(objpfx)md5test): Replace ".o" with
	$(test-object-suffix).
	($(objpfx)md5test-giant): Likewise.
	($(objpfx)sha256test): Likewise.
	($(objpfx)sha512test): Likewise.
	* math/Makefile (LDFLAGS-atest-exp): New.
	(LDFLAGS-atest-sincos): Likewise.
	(LDFLAGS-atest-exp2): Likewise.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add missing math_private includes.</title>
<updated>2015-05-20T12:48:48+00:00</updated>
<author>
<name>Wilco Dijkstra</name>
<email>wdijkstr@arm.com</email>
</author>
<published>2015-05-20T12:48:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=5be91118f623db41c74c5fdaebf12200a779e6e6'/>
<id>5be91118f623db41c74c5fdaebf12200a779e6e6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix ldbl-96 remquol (finite, Inf) (bug 18244).</title>
<updated>2015-05-19T23:44:28+00:00</updated>
<author>
<name>Joseph Myers</name>
<email>joseph@codesourcery.com</email>
</author>
<published>2015-05-19T23:44:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=3ce2232efb008e129908b9f35c4266991d9361de'/>
<id>3ce2232efb008e129908b9f35c4266991d9361de</id>
<content type='text'>
ldbl-96 remquol wrongly handles the case where the first argument is
finite and the second infinite, because the check for the second
argument being a NaN fails to disregard the explicit high mantissa bit
and so wrongly interprets an infinity as being a NaN.  This patch
fixes this by masking off that bit, and improves test coverage for
both remainder and remquo (various cases were missing tests, or, as in
the case of the bug, were tested only for one of the two functions).

Tested for x86_64 and x86.

	[BZ #18244]
	* sysdeps/ieee754/ldbl-96/s_remquol.c (__remquol): Ignore explicit
	high mantissa bit when testing whether P is a NaN.
	* math/libm-test.inc (remainder_test_data): Add more tests.
	(remquo_test_data): Likewise.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ldbl-96 remquol wrongly handles the case where the first argument is
finite and the second infinite, because the check for the second
argument being a NaN fails to disregard the explicit high mantissa bit
and so wrongly interprets an infinity as being a NaN.  This patch
fixes this by masking off that bit, and improves test coverage for
both remainder and remquo (various cases were missing tests, or, as in
the case of the bug, were tested only for one of the two functions).

Tested for x86_64 and x86.

	[BZ #18244]
	* sysdeps/ieee754/ldbl-96/s_remquol.c (__remquol): Ignore explicit
	high mantissa bit when testing whether P is a NaN.
	* math/libm-test.inc (remainder_test_data): Add more tests.
	(remquo_test_data): Likewise.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix i386 atanhl spurious underflows (bug 18049).</title>
<updated>2015-05-19T23:05:22+00:00</updated>
<author>
<name>Joseph Myers</name>
<email>joseph@codesourcery.com</email>
</author>
<published>2015-05-19T23:05:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=526af54142db14c1edcd2d80dc1b56d33ff4e8ce'/>
<id>526af54142db14c1edcd2d80dc1b56d33ff4e8ce</id>
<content type='text'>
The i386 implementation of atanhl, for small arguments, does a
calculation that involves computing twice the square of the argument,
resulting in spurious underflows for some arguments.  This patch fixes
this by just returning the argument when its exponent is below -32,
with underflow being forced as needed for subnormal arguments.

Tested for x86 and x86_64.

	[BZ #18049]
	* sysdeps/i386/fpu/e_atanhl.S (__ieee754_atanhl): For exponents
	below -32, return the argument, with underflow if subnormal.
	* math/auto-libm-test-in: Add more tests of atanh.
	* math/auto-libm-test-out: Regenerated.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The i386 implementation of atanhl, for small arguments, does a
calculation that involves computing twice the square of the argument,
resulting in spurious underflows for some arguments.  This patch fixes
this by just returning the argument when its exponent is below -32,
with underflow being forced as needed for subnormal arguments.

Tested for x86 and x86_64.

	[BZ #18049]
	* sysdeps/i386/fpu/e_atanhl.S (__ieee754_atanhl): For exponents
	below -32, return the argument, with underflow if subnormal.
	* math/auto-libm-test-in: Add more tests of atanh.
	* math/auto-libm-test-out: Regenerated.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix atanhl missing underflows (bug 16352).</title>
<updated>2015-05-15T22:07:57+00:00</updated>
<author>
<name>Joseph Myers</name>
<email>joseph@codesourcery.com</email>
</author>
<published>2015-05-15T22:07:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=8020a808870dc6199e584562b3b64f52054359e8'/>
<id>8020a808870dc6199e584562b3b64f52054359e8</id>
<content type='text'>
Similar to various other bugs in this area, some atanh implementations
do not raise the underflow exception for subnormal arguments, when the
result is tiny and inexact.  This patch forces the exception in a
similar way to previous fixes.  (No change in this regard is needed
for the i386 implementation; special handling to force underflows in
these cases will only be needed there when the spurious underflows,
bug 18049, get fixed.)

Tested for x86_64, x86, powerpc and mips64.

	[BZ #16352]
	* sysdeps/i386/fpu/e_atanh.S (dbl_min): New object.
	(__ieee754_atanh): Force underflow exception for results with
	small absolute value.
	* sysdeps/i386/fpu/e_atanhf.S (flt_min): New object.
	(__ieee754_atanhf): Force underflow exception for results with
	small absolute value.
	* sysdeps/ieee754/dbl-64/e_atanh.c: Include &lt;float.h&gt;.
	(__ieee754_atanh): Force underflow exception for results with
	small absolute value.
	* sysdeps/ieee754/flt-32/e_atanhf.c: Include &lt;float.h&gt;.
	(__ieee754_atanhf): Force underflow exception for results with
	small absolute value.
	* sysdeps/ieee754/ldbl-128/e_atanhl.c: Include &lt;float.h&gt;.
	(__ieee754_atanhl): Force underflow exception for results with
	small absolute value.
	* sysdeps/ieee754/ldbl-128ibm/e_atanhl.c: Include &lt;float.h&gt;.
	(__ieee754_atanhl): Force underflow exception for results with
	small absolute value.
	* sysdeps/ieee754/ldbl-96/e_atanhl.c: Include &lt;float.h&gt;.
	(__ieee754_atanhl): Force underflow exception for results with
	small absolute value.
	* math/auto-libm-test-in: Do not allow missing underflow
	exceptions from atanh.
	* math/auto-libm-test-out: Regenerated.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Similar to various other bugs in this area, some atanh implementations
do not raise the underflow exception for subnormal arguments, when the
result is tiny and inexact.  This patch forces the exception in a
similar way to previous fixes.  (No change in this regard is needed
for the i386 implementation; special handling to force underflows in
these cases will only be needed there when the spurious underflows,
bug 18049, get fixed.)

Tested for x86_64, x86, powerpc and mips64.

	[BZ #16352]
	* sysdeps/i386/fpu/e_atanh.S (dbl_min): New object.
	(__ieee754_atanh): Force underflow exception for results with
	small absolute value.
	* sysdeps/i386/fpu/e_atanhf.S (flt_min): New object.
	(__ieee754_atanhf): Force underflow exception for results with
	small absolute value.
	* sysdeps/ieee754/dbl-64/e_atanh.c: Include &lt;float.h&gt;.
	(__ieee754_atanh): Force underflow exception for results with
	small absolute value.
	* sysdeps/ieee754/flt-32/e_atanhf.c: Include &lt;float.h&gt;.
	(__ieee754_atanhf): Force underflow exception for results with
	small absolute value.
	* sysdeps/ieee754/ldbl-128/e_atanhl.c: Include &lt;float.h&gt;.
	(__ieee754_atanhl): Force underflow exception for results with
	small absolute value.
	* sysdeps/ieee754/ldbl-128ibm/e_atanhl.c: Include &lt;float.h&gt;.
	(__ieee754_atanhl): Force underflow exception for results with
	small absolute value.
	* sysdeps/ieee754/ldbl-96/e_atanhl.c: Include &lt;float.h&gt;.
	(__ieee754_atanhl): Force underflow exception for results with
	small absolute value.
	* math/auto-libm-test-in: Do not allow missing underflow
	exceptions from atanh.
	* math/auto-libm-test-out: Regenerated.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix tanf spurious underflows (bug 18221).</title>
<updated>2015-05-15T17:47:29+00:00</updated>
<author>
<name>Joseph Myers</name>
<email>joseph@codesourcery.com</email>
</author>
<published>2015-05-15T17:47:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=5a608ccc2d676aa124f6b55a7b20d071e408ca31'/>
<id>5a608ccc2d676aa124f6b55a7b20d071e408ca31</id>
<content type='text'>
The flt-32 implementation of tanf produces spurious underflow
exceptions for some small arguments, through computing values on the
order of x^5.  This patch fixes this by adjusting the threshold for
returning x (or, as applicable, +/- 1/x) to 2**-13 (the next term in
the power series being x^3/3).

Tested for x86_64 and x86.

	[BZ #18221]
	* sysdeps/ieee754/flt-32/k_tanf.c (__kernel_tanf): Use 2**-13 not
	2**-28 as threshold for returning x or +/- 1/x.
	* math/auto-libm-test-in: Add more tests of tan.
	* math/auto-libm-test-out: Regenerated.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The flt-32 implementation of tanf produces spurious underflow
exceptions for some small arguments, through computing values on the
order of x^5.  This patch fixes this by adjusting the threshold for
returning x (or, as applicable, +/- 1/x) to 2**-13 (the next term in
the power series being x^3/3).

Tested for x86_64 and x86.

	[BZ #18221]
	* sysdeps/ieee754/flt-32/k_tanf.c (__kernel_tanf): Use 2**-13 not
	2**-28 as threshold for returning x or +/- 1/x.
	* math/auto-libm-test-in: Add more tests of tan.
	* math/auto-libm-test-out: Regenerated.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix lgammaf spurious underflows (bug 18220).</title>
<updated>2015-05-15T17:21:08+00:00</updated>
<author>
<name>Joseph Myers</name>
<email>joseph@codesourcery.com</email>
</author>
<published>2015-05-15T17:21:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=ff069f024ae8cf15d53429e034d67ddcece0f67a'/>
<id>ff069f024ae8cf15d53429e034d67ddcece0f67a</id>
<content type='text'>
The flt-32 implementation of lgammaf produces spurious underflow
exceptions for some large arguments, because of calculations involving
x^-2 multiplied by small constants.  This patch fixes this by
adjusting the threshold for a simpler computation to 2**26 (the error
in the simpler computation is on the order of 0.5 * log (x), for a
result on the order of x * log (x)).

Tested for x86_64 and x86.

	[BZ #18220]
	* sysdeps/ieee754/flt-32/e_lgammaf_r.c (__ieee754_lgammaf_r): Use
	2**26 not 2**58 as threshold for returning x * (log (x) - 1).
	* math/auto-libm-test-in: Add another test of lgamma.
	* math/auto-libm-test-out: Regenerated.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The flt-32 implementation of lgammaf produces spurious underflow
exceptions for some large arguments, because of calculations involving
x^-2 multiplied by small constants.  This patch fixes this by
adjusting the threshold for a simpler computation to 2**26 (the error
in the simpler computation is on the order of 0.5 * log (x), for a
result on the order of x * log (x)).

Tested for x86_64 and x86.

	[BZ #18220]
	* sysdeps/ieee754/flt-32/e_lgammaf_r.c (__ieee754_lgammaf_r): Use
	2**26 not 2**58 as threshold for returning x * (log (x) - 1).
	* math/auto-libm-test-in: Add another test of lgamma.
	* math/auto-libm-test-out: Regenerated.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix erfcf spurious underflows (bug 18217).</title>
<updated>2015-05-15T00:16:10+00:00</updated>
<author>
<name>Joseph Myers</name>
<email>joseph@codesourcery.com</email>
</author>
<published>2015-05-15T00:16:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=fbc68f03b0e56db6a07d789fd403eb79d726fe96'/>
<id>fbc68f03b0e56db6a07d789fd403eb79d726fe96</id>
<content type='text'>
The flt-32 implementation of erfcf produces spurious underflow
exceptions for some arguments close to 0, because of calculations
squaring the argument and then multiplying by small constants.  This
patch fixes this by adjusting the threshold for arguments for which
the result is so close to 1 that 1 - x will give the right result from
2**-56 to 2**-26.  (If 1 - x * 2/sqrt(pi) were used, the errors would be
on the order of x^3 and a much larger threshold could be used.)

Tested for x86_64 and x86.

	[BZ #18217]
	* sysdeps/ieee754/flt-32/s_erff.c (__erfcf): Use 2**-26 not 2**-56
	as threshold for returning 1 - x.
	* math/auto-libm-test-in: Add more tests of erfc.
	* math/auto-libm-test-out: Regenerated.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The flt-32 implementation of erfcf produces spurious underflow
exceptions for some arguments close to 0, because of calculations
squaring the argument and then multiplying by small constants.  This
patch fixes this by adjusting the threshold for arguments for which
the result is so close to 1 that 1 - x will give the right result from
2**-56 to 2**-26.  (If 1 - x * 2/sqrt(pi) were used, the errors would be
on the order of x^3 and a much larger threshold could be used.)

Tested for x86_64 and x86.

	[BZ #18217]
	* sysdeps/ieee754/flt-32/s_erff.c (__erfcf): Use 2**-26 not 2**-56
	as threshold for returning 1 - x.
	* math/auto-libm-test-in: Add more tests of erfc.
	* math/auto-libm-test-out: Regenerated.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix atanf spurious underflows (bug 18196).</title>
<updated>2015-05-14T23:51:09+00:00</updated>
<author>
<name>Joseph Myers</name>
<email>joseph@codesourcery.com</email>
</author>
<published>2015-05-14T23:51:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=9a71f1fcf53615c00b5f9e5da4bba92bccb0efb4'/>
<id>9a71f1fcf53615c00b5f9e5da4bba92bccb0efb4</id>
<content type='text'>
The sysdeps/ieee754/flt-32 version of atanf produces spurious
underflow exceptions for some large arguments, because of computations
that compute x^-4.  This patch fixes this by adjusting the threshold
for large arguments (for which +/- pi/2 can just be returned, the
correct result being roughly +/- pi/2 - 1/x) from 2^34 to 2^25.

Tested for x86_64 and x86.

	[BZ #18196]
	* sysdeps/ieee754/flt-32/s_atanf.c (__atanf): Use 2^25 not 2^34 as
	threshold for large arguments.
	* math/auto-libm-test-in: Add another test of atan.
	* math/auto-libm-test-out: Regenerated.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The sysdeps/ieee754/flt-32 version of atanf produces spurious
underflow exceptions for some large arguments, because of computations
that compute x^-4.  This patch fixes this by adjusting the threshold
for large arguments (for which +/- pi/2 can just be returned, the
correct result being roughly +/- pi/2 - 1/x) from 2^34 to 2^25.

Tested for x86_64 and x86.

	[BZ #18196]
	* sysdeps/ieee754/flt-32/s_atanf.c (__atanf): Use 2^25 not 2^34 as
	threshold for large arguments.
	* math/auto-libm-test-in: Add another test of atan.
	* math/auto-libm-test-out: Regenerated.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix log1p missing underflows (bug 16339).</title>
<updated>2015-05-14T23:38:07+00:00</updated>
<author>
<name>Joseph Myers</name>
<email>joseph@codesourcery.com</email>
</author>
<published>2015-05-14T23:38:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=0b7a5f920163d03806d7c5d9d1c83b16942c9496'/>
<id>0b7a5f920163d03806d7c5d9d1c83b16942c9496</id>
<content type='text'>
Similar to various other bugs in this area, some log1p implementations
do not raise the underflow exception for subnormal arguments, when the
result is tiny and inexact.  This patch forces the exception in a
similar way to previous fixes.  (The ldbl-128ibm implementation
doesn't currently need any change as it already generates this
exception, albeit through code that would generate spurious exceptions
in other cases; special code for this issue will only be needed there
when fixing the spurious exceptions.)

Tested for x86_64, x86, powerpc and mips64.

	[BZ #16339]
	* sysdeps/i386/fpu/s_log1p.S (dbl_min): New object.
	(__log1p): Force underflow exception for results with small
	absolute value.
	* sysdeps/i386/fpu/s_log1pf.S (flt_min): New object.
	(__log1pf): Force underflow exception for results with small
	absolute value.
	* sysdeps/ieee754/dbl-64/s_log1p.c: Include &lt;float.h&gt;.
	(__log1p): Force underflow exception for results with small
	absolute value.
	* sysdeps/ieee754/flt-32/s_log1pf.c: Include &lt;float.h&gt;.
	(__log1pf): Force underflow exception for results with small
	absolute value.
	* sysdeps/ieee754/ldbl-128/s_log1pl.c: Include &lt;float.h&gt;.
	(__log1pl): Force underflow exception for results with small
	absolute value.
	* math/auto-libm-test-in: Do not allow missing underflow
	exceptions from log1p.
	* math/auto-libm-test-out: Regenerated.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Similar to various other bugs in this area, some log1p implementations
do not raise the underflow exception for subnormal arguments, when the
result is tiny and inexact.  This patch forces the exception in a
similar way to previous fixes.  (The ldbl-128ibm implementation
doesn't currently need any change as it already generates this
exception, albeit through code that would generate spurious exceptions
in other cases; special code for this issue will only be needed there
when fixing the spurious exceptions.)

Tested for x86_64, x86, powerpc and mips64.

	[BZ #16339]
	* sysdeps/i386/fpu/s_log1p.S (dbl_min): New object.
	(__log1p): Force underflow exception for results with small
	absolute value.
	* sysdeps/i386/fpu/s_log1pf.S (flt_min): New object.
	(__log1pf): Force underflow exception for results with small
	absolute value.
	* sysdeps/ieee754/dbl-64/s_log1p.c: Include &lt;float.h&gt;.
	(__log1p): Force underflow exception for results with small
	absolute value.
	* sysdeps/ieee754/flt-32/s_log1pf.c: Include &lt;float.h&gt;.
	(__log1pf): Force underflow exception for results with small
	absolute value.
	* sysdeps/ieee754/ldbl-128/s_log1pl.c: Include &lt;float.h&gt;.
	(__log1pl): Force underflow exception for results with small
	absolute value.
	* math/auto-libm-test-in: Do not allow missing underflow
	exceptions from log1p.
	* math/auto-libm-test-out: Regenerated.
</pre>
</div>
</content>
</entry>
</feed>
