mailing list of musl libc
 help / color / mirror / code / Atom feed
abe20152125ac5cbc13a6a381d6e935be30d206f blob 715 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
 
#include "libm.h"

#ifdef LONG_DOUBLE_IS_BINARY64
long double cosl(long double x) {
	return cos(x);
}
#elif defined(LONG_DOUBLE_IS_X87_EXTENDED) || defined(LONG_DOUBLE_IS_BINARY128)
long double cosl(long double x)
{
	union ldshape u = {x};
	unsigned n;
	long double y[2], hi, lo;

	u.i.se &= 0x7fff;
	if (u.i.se == 0x7fff)
		return x - x;
	x = u.f;
	if (x < M_PI_4) {
		if (u.i.se < 0x3fff - LDBL_MANT_DIG)
			/* raise inexact if x!=0 */
			return 1.0 + x;
		return __cosl(x, 0);
	}
	n = __rem_pio2l(x, y);
	hi = y[0];
	lo = y[1];
	switch (n & 3) {
	case 0:
		return __cosl(hi, lo);
	case 1:
		return -__sinl(hi, lo, 1);
	case 2:
		return -__cosl(hi, lo);
	case 3:
	default:
		return __sinl(hi, lo, 1);
	}
}
#endif
debug log:

solving abe2015 ...
found abe2015 in https://inbox.vuxu.org/musl/1457404695-17281-1-git-send-email-masanori.ogino@gmail.com/
found 79c41c7 in https://git.vuxu.org/mirror/musl/
preparing index
index prepared:
100644 79c41c77fa6a0addc57e33c62f31d879392b36e6	src/math/cosl.c

applying [1/1] https://inbox.vuxu.org/musl/1457404695-17281-1-git-send-email-masanori.ogino@gmail.com/
diff --git a/src/math/cosl.c b/src/math/cosl.c
index 79c41c7..abe2015 100644

Checking patch src/math/cosl.c...
Applied patch src/math/cosl.c cleanly.

index at:
100644 abe20152125ac5cbc13a6a381d6e935be30d206f	src/math/cosl.c

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).