mailing list of musl libc
 help / color / mirror / code / Atom feed
c38143f1daaffc3919088d3cacec716969529161 blob 1075 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
 
#define _GNU_SOURCE
#include "libm.h"

#ifdef LONG_DOUBLE_IS_BINARY64
void sincosl(long double x, long double *sin, long double *cos)
{
	double sind, cosd;
	sincos(x, &sind, &cosd);
	*sin = sind;
	*cos = cosd;
}
#elif defined(LONG_DOUBLE_IS_X87_EXTENDED) || defined(LONG_DOUBLE_IS_BINARY128)
void sincosl(long double x, long double *sin, long double *cos)
{
	union ldshape u = {x};
	unsigned n;
	long double y[2], s, c;

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

solving c38143f ...
found c38143f in https://inbox.vuxu.org/musl/1457404695-17281-1-git-send-email-masanori.ogino@gmail.com/
found d3ac1c4 in https://git.vuxu.org/mirror/musl/
preparing index
index prepared:
100644 d3ac1c4c8c29e11067d55a3a99fa82eb888c5dd5	src/math/sincosl.c

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

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

index at:
100644 c38143f1daaffc3919088d3cacec716969529161	src/math/sincosl.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).