mirror of
https://github.com/ziglang/zig.git
synced 2025-02-10 22:50:18 +00:00
std: export ceil builtins in stage2
This commit is contained in:
parent
1bbb886694
commit
a94267b290
@ -46,6 +46,10 @@ comptime {
|
||||
|
||||
@export(log10, .{ .name = "log10", .linkage = .Strong });
|
||||
@export(log10f, .{ .name = "log10f", .linkage = .Strong });
|
||||
|
||||
@export(ceil, .{ .name = "ceil", .linkage = .Strong });
|
||||
@export(ceilf, .{ .name = "ceilf", .linkage = .Strong });
|
||||
@export(ceill, .{ .name = "ceill", .linkage = .Strong });
|
||||
}
|
||||
|
||||
// Avoid dragging in the runtime safety mechanisms into this .o file,
|
||||
@ -179,3 +183,18 @@ fn log10(a: f64) callconv(.C) f64 {
|
||||
fn log10f(a: f32) callconv(.C) f32 {
|
||||
return math.log10(a);
|
||||
}
|
||||
|
||||
fn ceilf(x: f32) callconv(.C) f32 {
|
||||
return math.ceil(x);
|
||||
}
|
||||
|
||||
fn ceil(x: f64) callconv(.C) f64 {
|
||||
return math.ceil(x);
|
||||
}
|
||||
|
||||
fn ceill(x: c_longdouble) callconv(.C) c_longdouble {
|
||||
if (!long_double_is_f128) {
|
||||
@panic("TODO implement this");
|
||||
}
|
||||
return math.ceil(x);
|
||||
}
|
||||
|
@ -613,19 +613,6 @@ export fn fmod(x: f64, y: f64) f64 {
|
||||
return generic_fmod(f64, x, y);
|
||||
}
|
||||
|
||||
export fn ceilf(x: f32) f32 {
|
||||
return math.ceil(x);
|
||||
}
|
||||
export fn ceil(x: f64) f64 {
|
||||
return math.ceil(x);
|
||||
}
|
||||
export fn ceill(x: c_longdouble) c_longdouble {
|
||||
if (!long_double_is_f128) {
|
||||
@panic("TODO implement this");
|
||||
}
|
||||
return math.ceil(x);
|
||||
}
|
||||
|
||||
export fn fmaf(a: f32, b: f32, c: f32) f32 {
|
||||
return math.fma(f32, a, b, c);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user