From a6d6af947d09fbd52662c96c6f0a12510ef15f70 Mon Sep 17 00:00:00 2001 From: mihael Date: Wed, 25 Mar 2026 00:20:21 +0100 Subject: [PATCH] `libzigc/math`: Implement more precise `cosl` in `compiler_rt` The implementation was ported from `musl`. Unit tests for `f80` and `f128` were also added. `__cosl` was already implemented in `trig.zig` while working on `sinl`. The changes were tested by running: ``` $ ./build/stage3/bin/zig build -p stage4 -Denable-llvm -Dno-lib $ stage4/bin/zig build test-libc -Dlibc-test-path= -Dtest-filter='math.cosl' -fqemu -fwasmtime --summary line Build Summary: 553/553 steps succeeded ``` --- lib/compiler_rt/cos.zig | 134 ++++++++++++++++++------ lib/libc/mingw/math/x86/cos.def.h | 65 ------------ lib/libc/mingw/math/x86/cosl.c | 46 -------- lib/libc/mingw/math/x86/cosl_internal.S | 55 ---------- lib/libc/musl/src/math/__cosl.c | 96 ----------------- lib/libc/musl/src/math/cosl.c | 39 ------- src/libs/mingw.zig | 2 - src/libs/musl.zig | 2 - src/libs/wasi_libc.zig | 2 - 9 files changed, 103 insertions(+), 338 deletions(-) delete mode 100644 lib/libc/mingw/math/x86/cos.def.h delete mode 100644 lib/libc/mingw/math/x86/cosl.c delete mode 100644 lib/libc/mingw/math/x86/cosl_internal.S delete mode 100644 lib/libc/musl/src/math/__cosl.c delete mode 100644 lib/libc/musl/src/math/cosl.c diff --git a/lib/compiler_rt/cos.zig b/lib/compiler_rt/cos.zig index 3534e7837cc2c144c167c38698115e907e6469b7..891133711467c84d655e08f09ee414b92b23ebc7 100644 --- a/lib/compiler_rt/cos.zig +++ b/lib/compiler_rt/cos.zig @@ -1,13 +1,23 @@ +//! Ported from musl, which is licensed under the MIT license: +//! https://git.musl-libc.org/cgit/musl/tree/COPYRIGHT +//! +//! https://git.musl-libc.org/cgit/musl/tree/src/math/cosf.c +//! https://git.musl-libc.org/cgit/musl/tree/src/math/cos.c +//! https://git.musl-libc.org/cgit/musl/tree/src/math/cosl.c + const std = @import("std"); const math = std.math; const mem = std.mem; const expect = std.testing.expect; +const expectApproxEqAbs = std.testing.expectApproxEqAbs; const compiler_rt = @import("../compiler_rt.zig"); const symbol = @import("../compiler_rt.zig").symbol; const trig = @import("trig.zig"); const rem_pio2 = @import("rem_pio2.zig").rem_pio2; const rem_pio2f = @import("rem_pio2f.zig").rem_pio2f; +const rem_pio2l = @import("rem_pio2l.zig").rem_pio2l; +const utils = @import("math_utils.zig"); comptime { symbol(&__cosh, "__cosh"); @@ -112,14 +122,36 @@ pub fn cos(x: f64) callconv(.c) f64 { }; } -pub fn __cosx(a: f80) callconv(.c) f80 { - // TODO: more efficient implementation - return @floatCast(cosq(a)); +fn coslGeneric(comptime T: type, x: T) T { + const se = utils.ldSignExponent(x) & 0x7fff; + if (se == 0x7fff) { + return x - x; + } + + if (@abs(x) < utils.pi_4) { + if (se < 0x3fff - math.floatMantissaBits(T)) { + // raise inexact if x!=0 + return 1.0 + x; + } + return trig.__cosl(T, x, 0.0); + } + + var y: [2]T = undefined; + const n = rem_pio2l(T, x, &y); + return switch (n & 3) { + 0 => trig.__cosl(T, y[0], y[1]), + 1 => -trig.__sinl(T, y[0], y[1], 1), + 2 => -trig.__cosl(T, y[0], y[1]), + else => trig.__sinl(T, y[0], y[1], 1), + }; +} + +pub fn __cosx(x: f80) callconv(.c) f80 { + return coslGeneric(f80, x); } -pub fn cosq(a: f128) callconv(.c) f128 { - // TODO: more correct implementation - return cos(@floatCast(a)); +pub fn cosq(x: f128) callconv(.c) f128 { + return coslGeneric(f128, x); } pub fn cosl(x: c_longdouble) callconv(.c) c_longdouble { @@ -133,38 +165,78 @@ pub fn cosl(x: c_longdouble) callconv(.c) c_longdouble { } } -test "cos32" { - const epsilon = 0.00001; +fn testCosSpecial(comptime T: type) !void { + const f = switch (T) { + f32 => cosf, + f64 => cos, + f80 => __cosx, + f128 => cosq, + else => @compileError("unimplemented"), + }; - try expect(math.approxEqAbs(f32, cosf(0.0), 1.0, epsilon)); - try expect(math.approxEqAbs(f32, cosf(0.2), 0.980067, epsilon)); - try expect(math.approxEqAbs(f32, cosf(0.8923), 0.627623, epsilon)); - try expect(math.approxEqAbs(f32, cosf(1.5), 0.070737, epsilon)); - try expect(math.approxEqAbs(f32, cosf(-1.5), 0.070737, epsilon)); - try expect(math.approxEqAbs(f32, cosf(37.45), 0.969132, epsilon)); - try expect(math.approxEqAbs(f32, cosf(89.123), 0.400798, epsilon)); + try expect(f(0.0) == 1.0); + try expect(f(-0.0) == 1.0); + try expect(math.isNan(f(math.inf(T)))); + try expect(math.isNan(f(-math.inf(T)))); + try expect(math.isNan(f(math.nan(T)))); } -test "cos64" { - const epsilon = 0.000001; - - try expect(math.approxEqAbs(f64, cos(0.0), 1.0, epsilon)); - try expect(math.approxEqAbs(f64, cos(0.2), 0.980067, epsilon)); - try expect(math.approxEqAbs(f64, cos(0.8923), 0.627623, epsilon)); - try expect(math.approxEqAbs(f64, cos(1.5), 0.070737, epsilon)); - try expect(math.approxEqAbs(f64, cos(-1.5), 0.070737, epsilon)); - try expect(math.approxEqAbs(f64, cos(37.45), 0.969132, epsilon)); - try expect(math.approxEqAbs(f64, cos(89.123), 0.40080, epsilon)); +test "cos32.normal" { + const epsilon = math.floatEps(f32); + try expectApproxEqAbs(@as(f32, 1.0), cosf(0.0), epsilon); + try expectApproxEqAbs(@as(f32, 0.9800666), cosf(0.2), epsilon); + try expectApproxEqAbs(@as(f32, 0.6276231), cosf(0.8923), epsilon); + try expectApproxEqAbs(@as(f32, 0.0707372), cosf(1.5), epsilon); + try expectApproxEqAbs(@as(f32, 0.0707372), cosf(-1.5), epsilon); + try expectApproxEqAbs(@as(f32, 0.96913195), cosf(37.45), epsilon); + try expectApproxEqAbs(@as(f32, 0.40079966), cosf(89.123), epsilon); } test "cos32.special" { - try expect(math.isNan(cosf(math.inf(f32)))); - try expect(math.isNan(cosf(-math.inf(f32)))); - try expect(math.isNan(cosf(math.nan(f32)))); + try testCosSpecial(f32); +} + +test "cos64.normal" { + const epsilon = math.floatEps(f64); + try expectApproxEqAbs(@as(f64, 1.0), cos(0.0), epsilon); + try expectApproxEqAbs(@as(f64, 0.9800665778412416), cos(0.2), epsilon); + try expectApproxEqAbs(@as(f64, 0.6276230983360804), cos(0.8923), epsilon); + try expectApproxEqAbs(@as(f64, 0.0707372016677029), cos(1.5), epsilon); + try expectApproxEqAbs(@as(f64, 0.0707372016677029), cos(-1.5), epsilon); + try expectApproxEqAbs(@as(f64, 0.9691317730707778), cos(37.45), epsilon); + try expectApproxEqAbs(@as(f64, 0.4008006809354791), cos(89.123), epsilon); } test "cos64.special" { - try expect(math.isNan(cos(math.inf(f64)))); - try expect(math.isNan(cos(-math.inf(f64)))); - try expect(math.isNan(cos(math.nan(f64)))); + try testCosSpecial(f64); +} + +test "cos80.normal" { + const epsilon = math.floatEps(f80); + try expectApproxEqAbs(@as(f80, 1.0), __cosx(0.0), epsilon); + try expectApproxEqAbs(@as(f80, 0.98006657784124163112419651674816888), __cosx(0.2), epsilon); + try expectApproxEqAbs(@as(f80, 0.62762309833608037003563995939286067), __cosx(0.8923), epsilon); + try expectApproxEqAbs(@as(f80, 0.070737201667702910088189851434268747), __cosx(1.5), epsilon); + try expectApproxEqAbs(@as(f80, 0.070737201667702910088189851434268747), __cosx(-1.5), epsilon); + try expectApproxEqAbs(@as(f80, 0.9691317730707771246), __cosx(37.45), epsilon); + try expectApproxEqAbs(@as(f80, 0.4008006809354834001), __cosx(89.123), epsilon); +} + +test "cos80.special" { + try testCosSpecial(f80); +} + +test "cos128.normal" { + const epsilon = math.floatEps(f128); + try expectApproxEqAbs(@as(f128, 1.0), cosq(0.0), epsilon); + try expectApproxEqAbs(@as(f128, 0.98006657784124163112419651674816888), cosq(0.2), epsilon); + try expectApproxEqAbs(@as(f128, 0.62762309833608037003563995939286067), cosq(0.8923), epsilon); + try expectApproxEqAbs(@as(f128, 0.070737201667702910088189851434268747), cosq(1.5), epsilon); + try expectApproxEqAbs(@as(f128, 0.070737201667702910088189851434268747), cosq(-1.5), epsilon); + try expectApproxEqAbs(@as(f128, 0.96913177307077712443149563847233230), cosq(37.45), epsilon); + try expectApproxEqAbs(@as(f128, 0.40080068093548339848199454493704702), cosq(89.123), epsilon); +} + +test "cos128.special" { + try testCosSpecial(f128); } diff --git a/lib/libc/mingw/math/x86/cos.def.h b/lib/libc/mingw/math/x86/cos.def.h deleted file mode 100644 index f082f3740845a0351dbef31c308aab6fa18756b1..0000000000000000000000000000000000000000 --- a/lib/libc/mingw/math/x86/cos.def.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - This Software is provided under the Zope Public License (ZPL) Version 2.1. - - Copyright (c) 2009, 2010 by the mingw-w64 project - - See the AUTHORS file for the list of contributors to the mingw-w64 project. - - This license has been certified as open source. It has also been designated - as GPL compatible by the Free Software Foundation (FSF). - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions in source code must retain the accompanying copyright - notice, this list of conditions, and the following disclaimer. - 2. Redistributions in binary form must reproduce the accompanying - copyright notice, this list of conditions, and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - 3. Names of the copyright holders must not be used to endorse or promote - products derived from this software without prior written permission - from the copyright holders. - 4. The right to distribute this software or to use it for any purpose does - not give you the right to use Servicemarks (sm) or Trademarks (tm) of - the copyright holders. Use of them is covered by separate agreement - with the copyright holders. - 5. If any files are modified, you must cause the modified files to carry - prominent notices stating that you changed the files and the date of - any change. - - Disclaimer - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO - EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "../complex/complex_internal.h" -#include - -extern long double __cosl_internal (long double); - -__FLT_TYPE -__FLT_ABI(cos) (__FLT_TYPE x) -{ - int x_class = fpclassify (x); - if (x_class == FP_NAN) - { - __FLT_RPT_DOMAIN ("cos", x, 0.0, x); - return x; - } - else if (x_class == FP_INFINITE) - { - __FLT_RPT_DOMAIN ("cos", x, 0.0, __FLT_NAN); - return __FLT_NAN; - } - return (__FLT_TYPE) __cosl_internal ((long double) x); -} diff --git a/lib/libc/mingw/math/x86/cosl.c b/lib/libc/mingw/math/x86/cosl.c deleted file mode 100644 index f798862d3d934dc25870bea9288fdd18b42d554d..0000000000000000000000000000000000000000 --- a/lib/libc/mingw/math/x86/cosl.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - This Software is provided under the Zope Public License (ZPL) Version 2.1. - - Copyright (c) 2009, 2010 by the mingw-w64 project - - See the AUTHORS file for the list of contributors to the mingw-w64 project. - - This license has been certified as open source. It has also been designated - as GPL compatible by the Free Software Foundation (FSF). - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions in source code must retain the accompanying copyright - notice, this list of conditions, and the following disclaimer. - 2. Redistributions in binary form must reproduce the accompanying - copyright notice, this list of conditions, and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - 3. Names of the copyright holders must not be used to endorse or promote - products derived from this software without prior written permission - from the copyright holders. - 4. The right to distribute this software or to use it for any purpose does - not give you the right to use Servicemarks (sm) or Trademarks (tm) of - the copyright holders. Use of them is covered by separate agreement - with the copyright holders. - 5. If any files are modified, you must cause the modified files to carry - prominent notices stating that you changed the files and the date of - any change. - - Disclaimer - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO - EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#define _NEW_COMPLEX_LDOUBLE 1 -#include "cos.def.h" diff --git a/lib/libc/mingw/math/x86/cosl_internal.S b/lib/libc/mingw/math/x86/cosl_internal.S deleted file mode 100644 index 3c8f60d143e1cde3abc31488bf288aa6d1c64876..0000000000000000000000000000000000000000 --- a/lib/libc/mingw/math/x86/cosl_internal.S +++ /dev/null @@ -1,55 +0,0 @@ -/** - * This file has no copyright assigned and is placed in the Public Domain. - * This file is part of the mingw-w64 runtime package. - * No warranty is given; refer to the file DISCLAIMER.PD within this package. - */ -#include <_mingw_mac.h> - - .file "cosl_internal.S" - .text -#ifdef __x86_64__ - .align 8 -#else - .align 4 -#endif -.globl __MINGW_USYMBOL(__cosl_internal) - .def __MINGW_USYMBOL(__cosl_internal); .scl 2; .type 32; .endef -__MINGW_USYMBOL(__cosl_internal): -#ifdef __x86_64__ - fldt (%rdx) - fcos - fnstsw %ax - testl $0x400,%eax - jz 1f - fldpi - fadd %st(0) - fxch %st(1) -2: fprem1 - fnstsw %ax - testl $0x400,%eax - jnz 2b - fstp %st(1) - fcos -1: movq %rcx,%rax - movq $0,8(%rcx) - fstpt (%rcx) - ret -#else - fldt 4(%esp) - fcos - fnstsw %ax - testl $0x400,%eax - jnz 1f - ret -1: fldpi - fadd %st(0) - fxch %st(1) -2: fprem1 - fnstsw %ax - testl $0x400,%eax - jnz 2b - fstp %st(1) - fcos - ret -#endif - diff --git a/lib/libc/musl/src/math/__cosl.c b/lib/libc/musl/src/math/__cosl.c deleted file mode 100644 index fa522ddd7ae263b02a0dfb00b04486aa4ca90af5..0000000000000000000000000000000000000000 --- a/lib/libc/musl/src/math/__cosl.c +++ /dev/null @@ -1,96 +0,0 @@ -/* origin: FreeBSD /usr/src/lib/msun/ld80/k_cosl.c */ -/* origin: FreeBSD /usr/src/lib/msun/ld128/k_cosl.c */ -/* - * ==================================================== - * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - * Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. - * - * Developed at SunSoft, a Sun Microsystems, Inc. business. - * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice - * is preserved. - * ==================================================== - */ - - -#include "libm.h" - -#if (LDBL_MANT_DIG == 64 || LDBL_MANT_DIG == 113) && LDBL_MAX_EXP == 16384 -#if LDBL_MANT_DIG == 64 -/* - * ld80 version of __cos.c. See __cos.c for most comments. - */ -/* - * Domain [-0.7854, 0.7854], range ~[-2.43e-23, 2.425e-23]: - * |cos(x) - c(x)| < 2**-75.1 - * - * The coefficients of c(x) were generated by a pari-gp script using - * a Remez algorithm that searches for the best higher coefficients - * after rounding leading coefficients to a specified precision. - * - * Simpler methods like Chebyshev or basic Remez barely suffice for - * cos() in 64-bit precision, because we want the coefficient of x^2 - * to be precisely -0.5 so that multiplying by it is exact, and plain - * rounding of the coefficients of a good polynomial approximation only - * gives this up to about 64-bit precision. Plain rounding also gives - * a mediocre approximation for the coefficient of x^4, but a rounding - * error of 0.5 ulps for this coefficient would only contribute ~0.01 - * ulps to the final error, so this is unimportant. Rounding errors in - * higher coefficients are even less important. - * - * In fact, coefficients above the x^4 one only need to have 53-bit - * precision, and this is more efficient. We get this optimization - * almost for free from the complications needed to search for the best - * higher coefficients. - */ -static const long double -C1 = 0.0416666666666666666136L; /* 0xaaaaaaaaaaaaaa9b.0p-68 */ -static const double -C2 = -0.0013888888888888874, /* -0x16c16c16c16c10.0p-62 */ -C3 = 0.000024801587301571716, /* 0x1a01a01a018e22.0p-68 */ -C4 = -0.00000027557319215507120, /* -0x127e4fb7602f22.0p-74 */ -C5 = 0.0000000020876754400407278, /* 0x11eed8caaeccf1.0p-81 */ -C6 = -1.1470297442401303e-11, /* -0x19393412bd1529.0p-89 */ -C7 = 4.7383039476436467e-14; /* 0x1aac9d9af5c43e.0p-97 */ -#define POLY(z) (z*(C1+z*(C2+z*(C3+z*(C4+z*(C5+z*(C6+z*C7))))))) -#elif LDBL_MANT_DIG == 113 -/* - * ld128 version of __cos.c. See __cos.c for most comments. - */ -/* - * Domain [-0.7854, 0.7854], range ~[-1.80e-37, 1.79e-37]: - * |cos(x) - c(x))| < 2**-122.0 - * - * 113-bit precision requires more care than 64-bit precision, since - * simple methods give a minimax polynomial with coefficient for x^2 - * that is 1 ulp below 0.5, but we want it to be precisely 0.5. See - * above for more details. - */ -static const long double -C1 = 0.04166666666666666666666666666666658424671L, -C2 = -0.001388888888888888888888888888863490893732L, -C3 = 0.00002480158730158730158730158600795304914210L, -C4 = -0.2755731922398589065255474947078934284324e-6L, -C5 = 0.2087675698786809897659225313136400793948e-8L, -C6 = -0.1147074559772972315817149986812031204775e-10L, -C7 = 0.4779477332386808976875457937252120293400e-13L; -static const double -C8 = -0.1561920696721507929516718307820958119868e-15, -C9 = 0.4110317413744594971475941557607804508039e-18, -C10 = -0.8896592467191938803288521958313920156409e-21, -C11 = 0.1601061435794535138244346256065192782581e-23; -#define POLY(z) (z*(C1+z*(C2+z*(C3+z*(C4+z*(C5+z*(C6+z*(C7+ \ - z*(C8+z*(C9+z*(C10+z*C11))))))))))) -#endif - -long double __cosl(long double x, long double y) -{ - long double hz,z,r,w; - - z = x*x; - r = POLY(z); - hz = 0.5*z; - w = 1.0-hz; - return w + (((1.0-w)-hz) + (z*r-x*y)); -} -#endif diff --git a/lib/libc/musl/src/math/cosl.c b/lib/libc/musl/src/math/cosl.c deleted file mode 100644 index 79c41c77fa6a0addc57e33c62f31d879392b36e6..0000000000000000000000000000000000000000 --- a/lib/libc/musl/src/math/cosl.c +++ /dev/null @@ -1,39 +0,0 @@ -#include "libm.h" - -#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024 -long double cosl(long double x) { - return cos(x); -} -#elif (LDBL_MANT_DIG == 64 || LDBL_MANT_DIG == 113) && LDBL_MAX_EXP == 16384 -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 diff --git a/src/libs/mingw.zig b/src/libs/mingw.zig index f8070ccbf8ff494f2dadacca1923ba9337dfc22f..f0a44ca4be1082811abd85af6026567ed8a80d7c 100644 --- a/src/libs/mingw.zig +++ b/src/libs/mingw.zig @@ -940,8 +940,6 @@ const mingw32_x86_src = [_][]const u8{ "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "atan2l.c", "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "atanhl.c", "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "atanl.c", - "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "cosl.c", - "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "cosl_internal.S", "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "cossinl.c", "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "exp2l.S", "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "expl.c", diff --git a/src/libs/musl.zig b/src/libs/musl.zig index d0375fb03efc42eec6dd22552e90aaa62512463a..f460fabc91b4fcccb6f8adab1378329826f31a48 100644 --- a/src/libs/musl.zig +++ b/src/libs/musl.zig @@ -811,8 +811,6 @@ const src_files = [_][]const u8{ "musl/src/math/__cos.c", "musl/src/math/__cosdf.c", "musl/src/math/coshl.c", - "musl/src/math/__cosl.c", - "musl/src/math/cosl.c", "musl/src/math/erf.c", "musl/src/math/erff.c", "musl/src/math/erfl.c", diff --git a/src/libs/wasi_libc.zig b/src/libs/wasi_libc.zig index 09897473d9bb3aa2ef89fc8c459990a0f7430ed1..ae092cb60b6c17fb61f417278541f490ec8a00b1 100644 --- a/src/libs/wasi_libc.zig +++ b/src/libs/wasi_libc.zig @@ -682,8 +682,6 @@ const libc_top_half_src_files = [_][]const u8{ "musl/src/math/__cos.c", "musl/src/math/__cosdf.c", "musl/src/math/coshl.c", - "musl/src/math/__cosl.c", - "musl/src/math/cosl.c", "musl/src/math/erf.c", "musl/src/math/erff.c", "musl/src/math/erfl.c", -- 2.54.0