diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-06-23 17:10:33 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-06-23 17:10:33 -0400 |
| commit | b2cbc59e4c354264f295a98d3df077773acd8400 (patch) | |
| tree | 1e21b4ee73bc9eadafb52b912cda174109f7b69d /std | |
| parent | ca3660f6bf3a1f8d77692acf72eefe148802d342 (diff) | |
| parent | 71e014caecaa54fdd8a0516710d2d9597da41398 (diff) | |
| download | zig-b2cbc59e4c354264f295a98d3df077773acd8400.tar.gz zig-b2cbc59e4c354264f295a98d3df077773acd8400.zip | |
Merge branch 'simd2' of https://github.com/shawnl/zig into shawnl-simd2
Diffstat (limited to 'std')
| -rw-r--r-- | std/special/c.zig | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/std/special/c.zig b/std/special/c.zig index 456070f609..15cefbd2a0 100644 --- a/std/special/c.zig +++ b/std/special/c.zig @@ -254,19 +254,32 @@ export fn fmod(x: f64, y: f64) f64 { // TODO add intrinsics for these (and probably the double version too) // and have the math stuff use the intrinsic. same as @mod and @rem -export fn floorf(x: f32) f32 { - return math.floor(x); -} -export fn ceilf(x: f32) f32 { - return math.ceil(x); -} -export fn floor(x: f64) f64 { - return math.floor(x); -} -export fn ceil(x: f64) f64 { - return math.ceil(x); -} - +export fn floorf(x: f32) f32 {return math.floor(x);} +export fn ceilf(x: f32) f32 {return math.ceil(x);} +export fn floor(x: f64) f64 {return math.floor(x);} +export fn ceil(x: f64) f64 {return math.ceil(x);} +export fn fma(a: f64, b: f64, c: f64) f64 {return math.fma(f64, a, b, c);} +export fn fmaf(a: f32, b: f32, c: f32) f32 {return math.fma(f32, a, b, c);} +export fn sin(a: f64) f64 {return math.sin(a);} +export fn sinf(a: f32) f32 {return math.sin(a);} +export fn cos(a: f64) f64 {return math.cos(a);} +export fn cosf(a: f32) f32 {return math.cos(a);} +export fn exp(a: f64) f64 {return math.exp(a);} +export fn expf(a: f32) f32 {return math.exp(a);} +export fn exp2(a: f64) f64 {return math.exp2(a);} +export fn exp2f(a: f32) f32 {return math.exp2(a);} +export fn log(a: f64) f64 {return math.ln(a);} +export fn logf(a: f32) f32 {return math.ln(a);} +export fn log2(a: f64) f64 {return math.log2(a);} +export fn log2f(a: f32) f32 {return math.log2(a);} +export fn log10(a: f64) f64 {return math.log10(a);} +export fn log10f(a: f32) f32 {return math.log10(a);} +export fn fabs(a: f64) f64 {return math.fabs(a);} +export fn fabsf(a: f32) f32 {return math.fabs(a);} +export fn trunc(a: f64) f64 {return math.trunc(a);} +export fn truncf(a: f32) f32 {return math.trunc(a);} +export fn round(a: f64) f64 {return math.round(a);} +export fn roundf(a: f32) f32 {return math.round(a);} fn generic_fmod(comptime T: type, x: T, y: T) T { @setRuntimeSafety(false); |
