<feed xmlns='http://www.w3.org/2005/Atom'>
<title>musl/src/math, branch v1.2.0</title>
<subtitle>musl - an implementation of the standard library for Linux-based systems</subtitle>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/'/>
<entry>
<title>remove i386 asm for single and double precision exp-family functions</title>
<updated>2020-02-06T21:46:15+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2020-02-06T21:29:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=a662220df547e5c2446518e74440a7d834f9ebe6'/>
<id>a662220df547e5c2446518e74440a7d834f9ebe6</id>
<content type='text'>
these did not truncate excess precision in the return value. fixing
them looks like considerable work, and the current C code seems to
outperform them significantly anyway.

long double functions are left in place because they are not subject
to excess precision issues and probably better than the C code.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
these did not truncate excess precision in the return value. fixing
them looks like considerable work, and the current C code seems to
outperform them significantly anyway.

long double functions are left in place because they are not subject
to excess precision issues and probably better than the C code.
</pre>
</div>
</content>
</entry>
<entry>
<title>rename i386 exp.s to exp_ld.s</title>
<updated>2020-02-06T21:24:03+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2020-02-06T21:24:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=2f0c31c0273b93196185a9d0dd260ee48e057c6d'/>
<id>2f0c31c0273b93196185a9d0dd260ee48e057c6d</id>
<content type='text'>
this commit is for the sake of reviewable history.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this commit is for the sake of reviewable history.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix excess precision in return value of i386 log-family functions</title>
<updated>2020-02-06T18:29:45+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2020-02-06T18:29:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=ab9e20905dc1cb74d955cc94b5b76e6e1892b8fe'/>
<id>ab9e20905dc1cb74d955cc94b5b76e6e1892b8fe</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix excess precision in return value of i386 acos[f] and asin[f]</title>
<updated>2020-02-06T18:21:26+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2020-02-06T17:06:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=141c8d4ccb183365df8d392ae64cd69c4f0df8bf'/>
<id>141c8d4ccb183365df8d392ae64cd69c4f0df8bf</id>
<content type='text'>
analogous to commit 1c9afd69051a64cf085c6fb3674a444ff9a43857 for
atan[2][f].
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
analogous to commit 1c9afd69051a64cf085c6fb3674a444ff9a43857 for
atan[2][f].
</pre>
</div>
</content>
</entry>
<entry>
<title>fix excess precision in return value of i386 atan[2][f]</title>
<updated>2020-02-06T18:18:00+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2020-02-06T16:34:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=1c9afd69051a64cf085c6fb3674a444ff9a43857'/>
<id>1c9afd69051a64cf085c6fb3674a444ff9a43857</id>
<content type='text'>
for functions implemented in C, this is a requirement of C11 (F.6);
strictly speaking that text does not apply to standard library
functions, but it seems to be intended to apply to them, and C2x is
expected to make it a requirement.

failure to drop excess precision is particularly bad for inverse trig
functions, where a value with excess precision can be outside the
range of the function (entire range, or range for a particular
subdomain), breaking reasonable invariants a caller may expect.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
for functions implemented in C, this is a requirement of C11 (F.6);
strictly speaking that text does not apply to standard library
functions, but it seems to be intended to apply to them, and C2x is
expected to make it a requirement.

failure to drop excess precision is particularly bad for inverse trig
functions, where a value with excess precision can be outside the
range of the function (entire range, or range for a particular
subdomain), breaking reasonable invariants a caller may expect.
</pre>
</div>
</content>
</entry>
<entry>
<title>math/x32: correct lrintl.s for 32-bit long</title>
<updated>2020-01-27T18:02:19+00:00</updated>
<author>
<name>Alexander Monakov</name>
<email>amonakov@ispras.ru</email>
</author>
<published>2020-01-18T16:15:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=ff5b8ad386d900e4a4c11ecdfb52dceadd9d0ee9'/>
<id>ff5b8ad386d900e4a4c11ecdfb52dceadd9d0ee9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ppc: add configure check for older compilers erroring on 'd' constraint</title>
<updated>2019-11-06T02:48:31+00:00</updated>
<author>
<name>rofl0r</name>
<email>rofl0r@users.noreply.github.com</email>
</author>
<published>2019-11-05T21:01:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=66d1e31292a8c05d172872fe73880ca6d3b68104'/>
<id>66d1e31292a8c05d172872fe73880ca6d3b68104</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>mips: add single-instruction math functions</title>
<updated>2019-10-14T14:04:47+00:00</updated>
<author>
<name>info@mobile-stream.com</name>
<email>info@mobile-stream.com</email>
</author>
<published>2019-09-11T10:05:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=1c9d2cba11ef2c9de31a6edb48eb20777be4a4f8'/>
<id>1c9d2cba11ef2c9de31a6edb48eb20777be4a4f8</id>
<content type='text'>
SQRT.fmt exists on MIPS II+ (float), MIPS III+ (double).

ABS.fmt exists on MIPS I+ but only cores with ABS2008 flag in FCSR
implement the required behaviour.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
SQRT.fmt exists on MIPS II+ (float), MIPS III+ (double).

ABS.fmt exists on MIPS I+ but only cores with ABS2008 flag in FCSR
implement the required behaviour.
</pre>
</div>
</content>
</entry>
<entry>
<title>math: fix signed int left shift ub in sqrt</title>
<updated>2019-10-13T21:46:58+00:00</updated>
<author>
<name>Szabolcs Nagy</name>
<email>nsz@port70.net</email>
</author>
<published>2019-10-13T14:54:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=e858063070eedb7fe78c37eba5177d8c5cfccfa6'/>
<id>e858063070eedb7fe78c37eba5177d8c5cfccfa6</id>
<content type='text'>
Both sqrt and sqrtf shifted the signed exponent as signed int to adjust
the bit representation of the result. There are signed right shifts too
in the code but those are implementation defined and are expected to
compile to arithmetic shift on supported compilers and targets.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Both sqrt and sqrtf shifted the signed exponent as signed int to adjust
the bit representation of the result. There are signed right shifts too
in the code but those are implementation defined and are expected to
compile to arithmetic shift on supported compilers and targets.
</pre>
</div>
</content>
</entry>
<entry>
<title>math: optimize lrint on 32bit targets</title>
<updated>2019-09-27T15:18:59+00:00</updated>
<author>
<name>Szabolcs Nagy</name>
<email>nsz@port70.net</email>
</author>
<published>2019-09-16T20:33:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=ca577951138127dcf4190a2eb3c7148b2ad6d779'/>
<id>ca577951138127dcf4190a2eb3c7148b2ad6d779</id>
<content type='text'>
lrint in (LONG_MAX, 1/DBL_EPSILON) and in (-1/DBL_EPSILON, LONG_MIN)
is not trivial: rounding to int may be inexact, but the conversion to
int may overflow and then the inexact flag must not be raised. (the
overflow threshold is rounding mode dependent).

this matters on 32bit targets (without single instruction lrint or
rint), so the common case (when there is no overflow) is optimized by
inlining the lrint logic, otherwise the old code is kept as a fallback.

on my laptop an i486 lrint call is asm:10ns, old c:30ns, new c:21ns
on a smaller arm core: old c:71ns, new c:34ns
on a bigger arm core: old c:27ns, new c:19ns
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
lrint in (LONG_MAX, 1/DBL_EPSILON) and in (-1/DBL_EPSILON, LONG_MIN)
is not trivial: rounding to int may be inexact, but the conversion to
int may overflow and then the inexact flag must not be raised. (the
overflow threshold is rounding mode dependent).

this matters on 32bit targets (without single instruction lrint or
rint), so the common case (when there is no overflow) is optimized by
inlining the lrint logic, otherwise the old code is kept as a fallback.

on my laptop an i486 lrint call is asm:10ns, old c:30ns, new c:21ns
on a smaller arm core: old c:71ns, new c:34ns
on a bigger arm core: old c:27ns, new c:19ns
</pre>
</div>
</content>
</entry>
</feed>
