Andrew Kelley 41dd2beaac compiler-rt: math functions reorg
* unify the logic for exporting math functions from compiler-rt,
   with the appropriate suffixes and prefixes.
   - add all missing f128 and f80 exports. Functions with missing
     implementations call other functions and have TODO comments.
   - also add f16 functions
 * move math functions from freestanding libc to compiler-rt (#7265)
 * enable all the f128 and f80 code in the stage2 compiler and behavior
   tests (#11161).
 * update std lib to use builtins rather than `std.math`.
2022-04-27 12:20:44 -07:00

25 lines
595 B
Zig

pub fn __sincosh(a: f16, r_sin: *f16, r_cos: *f16) callconv(.C) void {
r_sin.* = @sin(a);
r_cos.* = @cos(a);
}
pub fn sincosf(a: f32, r_sin: *f32, r_cos: *f32) callconv(.C) void {
r_sin.* = @sin(a);
r_cos.* = @cos(a);
}
pub fn sincos(a: f64, r_sin: *f64, r_cos: *f64) callconv(.C) void {
r_sin.* = @sin(a);
r_cos.* = @cos(a);
}
pub fn __sincosx(a: f80, r_sin: *f80, r_cos: *f80) callconv(.C) void {
r_sin.* = @sin(a);
r_cos.* = @cos(a);
}
pub fn sincosq(a: f128, r_sin: *f128, r_cos: *f128) callconv(.C) void {
r_sin.* = @sin(a);
r_cos.* = @cos(a);
}