| author | |
| committer | |
| log | e6ac1b77f0b958f8cefc6e357620f9fdef2c0eed |
| tree | 5c240418d4f132330b555247150b847e74ba7caa |
| parent | c857fce05bb8f0fd8053a5f15825704fb6506fd4 |
| signature |
4 files changed, 3 insertions(+), 22 deletions(-)
lib/libc/musl/src/math/i386/acos.s deleted-18| ... | ... | @@ -1,18 +0,0 @@ |
| 1 | # use acos(x) = atan2(fabs(sqrt((1-x)*(1+x))), x) | |
| 2 | ||
| 3 | .global acos | |
| 4 | .type acos,@function | |
| 5 | acos: | |
| 6 | 	fldl 4(%esp) | |
| 7 | 	fld %st(0) | |
| 8 | 	fld1 | |
| 9 | 	fsub %st(0),%st(1) | |
| 10 | 	fadd %st(2) | |
| 11 | 	fmulp | |
| 12 | 	fsqrt | |
| 13 | 	fabs # fix sign of zero (matters in downward rounding mode) | |
| 14 | 	fxch %st(1) | |
| 15 | 	fpatan | |
| 16 | 	fstpl 4(%esp) | |
| 17 | 	fldl 4(%esp) | |
| 18 | 	ret |
lib/std/math/acos.zig+2-2| ... | ... | @@ -48,7 +48,7 @@ fn acos32(x: f32) f32 { |
| 48 | 48 | return 0.0; |
| 49 | 49 | } |
| 50 | 50 | } else { |
| 51 | return math.nan(f32); | |
| 51 | return (x - x) / 0; | |
| 52 | 52 | } |
| 53 | 53 | } |
| 54 | 54 | |
| ... | ... | @@ -117,7 +117,7 @@ fn acos64(x: f64) f64 { |
| 117 | 117 | } |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | return math.nan(f64); | |
| 120 | return (x - x) / 0; | |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | // |x| < 0.5 |
src/libs/musl.zig-1| ... | ... | @@ -890,7 +890,6 @@ const src_files = [_][]const u8{ |
| 890 | 890 | "musl/src/math/hypotl.c", |
| 891 | 891 | "musl/src/math/i386/acosf.s", |
| 892 | 892 | "musl/src/math/i386/acosl.s", |
| 893 | "musl/src/math/i386/acos.s", | |
| 894 | 893 | "musl/src/math/i386/asinf.s", |
| 895 | 894 | "musl/src/math/i386/asinl.s", |
| 896 | 895 | "musl/src/math/i386/asin.s", |
test/libc.zig+1-1| ... | ... | @@ -138,7 +138,7 @@ pub fn addCases(cases: *tests.LibcContext) void { |
| 138 | 138 | cases.addLibcTestCase("regression/wcsncpy-read-overflow.c", true, .{}); |
| 139 | 139 | cases.addLibcTestCase("regression/wcsstr-false-negative.c", true, .{}); |
| 140 | 140 | |
| 141 | // cases.addLibcTestCase("math/acos.c", true, .{}); | |
| 141 | cases.addLibcTestCase("math/acos.c", true, .{}); | |
| 142 | 142 | // cases.addLibcTestCase("math/acosf.c", true, .{}); |
| 143 | 143 | // cases.addLibcTestCase("math/acosh.c", true, .{}); |
| 144 | 144 | cases.addLibcTestCase("math/acoshf.c", true, .{}); |