| author | |
| committer | |
| log | e60ba21114bc4514acc535be7106ce6c16e9bf04 |
| tree | 530816e88eab86aed30897121ddafda248a8a89a |
| parent | 2b19134c86223236b3fffc1360577a31d0251604 |
6 files changed, 1 insertions(+), 46 deletions(-)
lib/libc/mingw/math/roundl.c deleted-26| ... | @@ -1,26 +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 | #include <math.h> | ||
| 7 | |||
| 8 | long double | ||
| 9 | roundl (long double x) | ||
| 10 | { | ||
| 11 | long double res = 0.0L; | ||
| 12 | if (x >= 0.0L) | ||
| 13 | { | ||
| 14 | res = ceill (x); | ||
| 15 | if (res - x > 0.5L) | ||
| 16 | 	res -= 1.0L; | ||
| 17 | } | ||
| 18 | else | ||
| 19 | { | ||
| 20 | res = ceill (-x); | ||
| 21 | if (res + x > 0.5L) | ||
| 22 | 	res -= 1.0L; | ||
| 23 | res = -res; | ||
| 24 | } | ||
| 25 | return res; | ||
| 26 | } | ||
lib/libc/musl/src/math/s390x/roundl.c deleted-15| ... | @@ -1,15 +0,0 @@ | ||
| 1 | #include <math.h> | ||
| 2 | |||
| 3 | #if defined(__HTM__) || __ARCH__ >= 9 | ||
| 4 | |||
| 5 | long double roundl(long double x) | ||
| 6 | { | ||
| 7 | 	__asm__ ("fixbra %0, 1, %1, 4" : "=f"(x) : "f"(x)); | ||
| 8 | 	return x; | ||
| 9 | } | ||
| 10 | |||
| 11 | #else | ||
| 12 | |||
| 13 | #include "../roundl.c" | ||
| 14 | |||
| 15 | #endif | ||
src/libs/mingw.zig-1| ... | @@ -936,7 +936,6 @@ const mingw32_x86_src = [_][]const u8{ | ... | @@ -936,7 +936,6 @@ const mingw32_x86_src = [_][]const u8{ |
| 936 | "math" ++ path.sep_str ++ "lrintl.c", | 936 | "math" ++ path.sep_str ++ "lrintl.c", |
| 937 | "math" ++ path.sep_str ++ "lroundl.c", | 937 | "math" ++ path.sep_str ++ "lroundl.c", |
| 938 | "math" ++ path.sep_str ++ "rintl.c", | 938 | "math" ++ path.sep_str ++ "rintl.c", |
| 939 | "math" ++ path.sep_str ++ "roundl.c", | ||
| 940 | "math" ++ path.sep_str ++ "tgammal.c", | 939 | "math" ++ path.sep_str ++ "tgammal.c", |
| 941 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "_chgsignl.S", | 940 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "_chgsignl.S", |
| 942 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "acoshl.c", | 941 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "acoshl.c", |
src/libs/musl.zig-2| ... | @@ -1023,7 +1023,6 @@ const src_files = [_][]const u8{ | ... | @@ -1023,7 +1023,6 @@ const src_files = [_][]const u8{ |
| 1023 | "musl/src/math/riscv64/fmaf.c", | 1023 | "musl/src/math/riscv64/fmaf.c", |
| 1024 | "musl/src/math/round.c", | 1024 | "musl/src/math/round.c", |
| 1025 | "musl/src/math/roundf.c", | 1025 | "musl/src/math/roundf.c", |
| 1026 | "musl/src/math/roundl.c", | ||
| 1027 | "musl/src/math/s390x/fma.c", | 1026 | "musl/src/math/s390x/fma.c", |
| 1028 | "musl/src/math/s390x/fmaf.c", | 1027 | "musl/src/math/s390x/fmaf.c", |
| 1029 | "musl/src/math/s390x/nearbyint.c", | 1028 | "musl/src/math/s390x/nearbyint.c", |
| ... | @@ -1034,7 +1033,6 @@ const src_files = [_][]const u8{ | ... | @@ -1034,7 +1033,6 @@ const src_files = [_][]const u8{ |
| 1034 | "musl/src/math/s390x/rintl.c", | 1033 | "musl/src/math/s390x/rintl.c", |
| 1035 | "musl/src/math/s390x/round.c", | 1034 | "musl/src/math/s390x/round.c", |
| 1036 | "musl/src/math/s390x/roundf.c", | 1035 | "musl/src/math/s390x/roundf.c", |
| 1037 | "musl/src/math/s390x/roundl.c", | ||
| 1038 | "musl/src/math/scalb.c", | 1036 | "musl/src/math/scalb.c", |
| 1039 | "musl/src/math/scalbf.c", | 1037 | "musl/src/math/scalbf.c", |
| 1040 | "musl/src/math/scalbln.c", | 1038 | "musl/src/math/scalbln.c", |
src/libs/wasi_libc.zig-1| ... | @@ -810,7 +810,6 @@ const libc_top_half_src_files = [_][]const u8{ | ... | @@ -810,7 +810,6 @@ const libc_top_half_src_files = [_][]const u8{ |
| 810 | "musl/src/math/rintl.c", | 810 | "musl/src/math/rintl.c", |
| 811 | "musl/src/math/round.c", | 811 | "musl/src/math/round.c", |
| 812 | "musl/src/math/roundf.c", | 812 | "musl/src/math/roundf.c", |
| 813 | "musl/src/math/roundl.c", | ||
| 814 | "musl/src/math/scalb.c", | 813 | "musl/src/math/scalb.c", |
| 815 | "musl/src/math/scalbf.c", | 814 | "musl/src/math/scalbf.c", |
| 816 | "musl/src/math/scalbln.c", | 815 | "musl/src/math/scalbln.c", |
test/libc.zig+1-1| ... | @@ -298,7 +298,7 @@ pub fn addCases(cases: *tests.LibcContext) void { | ... | @@ -298,7 +298,7 @@ pub fn addCases(cases: *tests.LibcContext) void { |
| 298 | // cases.addLibcTestCase("math/rintl.c", true, .{}); | 298 | // cases.addLibcTestCase("math/rintl.c", true, .{}); |
| 299 | // cases.addLibcTestCase("math/round.c", true, .{}); | 299 | // cases.addLibcTestCase("math/round.c", true, .{}); |
| 300 | // cases.addLibcTestCase("math/roundf.c", true, .{}); | 300 | // cases.addLibcTestCase("math/roundf.c", true, .{}); |
| 301 | // cases.addLibcTestCase("math/roundl.c", true, .{}); | 301 | cases.addLibcTestCase("math/roundl.c", true, .{}); |
| 302 | cases.addLibcTestCase("math/scalb.c", true, .{}); | 302 | cases.addLibcTestCase("math/scalb.c", true, .{}); |
| 303 | cases.addLibcTestCase("math/scalbf.c", true, .{}); | 303 | cases.addLibcTestCase("math/scalbf.c", true, .{}); |
| 304 | cases.addLibcTestCase("math/scalbln.c", true, .{}); | 304 | cases.addLibcTestCase("math/scalbln.c", true, .{}); |