authorgravatar for hi@mihaelm.commihael <hi@mihaelm.com> 2026-03-18 18:50:16+01:00
committergravatar for hi@mihaelm.commihael <hi@mihaelm.com> 2026-04-02 23:54:19+02:00
loga8b710697eeb7d83364cdca303167d14571e75e3
tree72e57e6882574ffa0bdc1105d46d235ddf84b367
parentce3f254526609a9b2088d81070903107c969bb81
signaturebadge-check Signed by SSH key SHA256:aoFoShdYLdrqMichqKXSSieTKUfACUIDJHsKc4V2tQg

`libzigc/math`: Switch to `compiler_rt` impl of `sincosl`


5 files changed, 0 insertions(+), 76 deletions(-)

lib/libc/mingw/math/arm-common/sincosl.c deleted-13
...@@ -1,13 +0,0 @@
1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6
7#include <math.h>
8
9void sincosl(long double x, long double *s, long double *c)
10{
11 *s = sinl(x);
12 *c = cosl(x);
13}
lib/libc/musl/src/math/sincosl.c deleted-60
...@@ -1,60 +0,0 @@
1#define _GNU_SOURCE
2#include "libm.h"
3
4#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
5void sincosl(long double x, long double *sin, long double *cos)
6{
7 double sind, cosd;
8 sincos(x, &sind, &cosd);
9 *sin = sind;
10 *cos = cosd;
11}
12#elif (LDBL_MANT_DIG == 64 || LDBL_MANT_DIG == 113) && LDBL_MAX_EXP == 16384
13void sincosl(long double x, long double *sin, long double *cos)
14{
15 union ldshape u = {x};
16 unsigned n;
17 long double y[2], s, c;
18
19 u.i.se &= 0x7fff;
20 if (u.i.se == 0x7fff) {
21 *sin = *cos = x - x;
22 return;
23 }
24 if (u.f < M_PI_4) {
25 if (u.i.se < 0x3fff - LDBL_MANT_DIG) {
26 /* raise underflow if subnormal */
27 if (u.i.se == 0) FORCE_EVAL(x*0x1p-120f);
28 *sin = x;
29 /* raise inexact if x!=0 */
30 *cos = 1.0 + x;
31 return;
32 }
33 *sin = __sinl(x, 0, 0);
34 *cos = __cosl(x, 0);
35 return;
36 }
37 n = __rem_pio2l(x, y);
38 s = __sinl(y[0], y[1], 1);
39 c = __cosl(y[0], y[1]);
40 switch (n & 3) {
41 case 0:
42 *sin = s;
43 *cos = c;
44 break;
45 case 1:
46 *sin = c;
47 *cos = -s;
48 break;
49 case 2:
50 *sin = -s;
51 *cos = -c;
52 break;
53 case 3:
54 default:
55 *sin = -c;
56 *cos = s;
57 break;
58 }
59}
60#endif
src/libs/mingw.zig-1
...@@ -987,7 +987,6 @@ const mingw32_x86_32_src = [_][]const u8{...@@ -987,7 +987,6 @@ const mingw32_x86_32_src = [_][]const u8{
987const mingw32_arm_src = [_][]const u8{987const mingw32_arm_src = [_][]const u8{
988 // mingwex988 // mingwex
989 "math" ++ path.sep_str ++ "arm-common" ++ path.sep_str ++ "ldexpl.c",989 "math" ++ path.sep_str ++ "arm-common" ++ path.sep_str ++ "ldexpl.c",
990 "math" ++ path.sep_str ++ "arm-common" ++ path.sep_str ++ "sincosl.c",
991};990};
992991
993const mingw32_arm32_src = [_][]const u8{992const mingw32_arm32_src = [_][]const u8{
src/libs/musl.zig-1
...@@ -992,7 +992,6 @@ const src_files = [_][]const u8{...@@ -992,7 +992,6 @@ const src_files = [_][]const u8{
992 "musl/src/math/significand.c",992 "musl/src/math/significand.c",
993 "musl/src/math/significandf.c",993 "musl/src/math/significandf.c",
994 "musl/src/math/__sin.c",994 "musl/src/math/__sin.c",
995 "musl/src/math/sincosl.c",
996 "musl/src/math/__sindf.c",995 "musl/src/math/__sindf.c",
997 "musl/src/math/sinh.c",996 "musl/src/math/sinh.c",
998 "musl/src/math/sinhf.c",997 "musl/src/math/sinhf.c",
src/libs/wasi_libc.zig-1
...@@ -785,7 +785,6 @@ const libc_top_half_src_files = [_][]const u8{...@@ -785,7 +785,6 @@ const libc_top_half_src_files = [_][]const u8{
785 "musl/src/math/significand.c",785 "musl/src/math/significand.c",
786 "musl/src/math/significandf.c",786 "musl/src/math/significandf.c",
787 "musl/src/math/__sin.c",787 "musl/src/math/__sin.c",
788 "musl/src/math/sincosl.c",
789 "musl/src/math/__sindf.c",788 "musl/src/math/__sindf.c",
790 "musl/src/math/sinhl.c",789 "musl/src/math/sinhl.c",
791 "musl/src/math/__sinl.c",790 "musl/src/math/__sinl.c",