| ... | @@ -680,6 +680,10 @@ comptime { | ... | @@ -680,6 +680,10 @@ comptime { |
| 680 | @export(floor, .{ .name = "floor", .linkage = linkage }); | 680 | @export(floor, .{ .name = "floor", .linkage = linkage }); |
| 681 | @export(floorl, .{ .name = "floorl", .linkage = linkage }); | 681 | @export(floorl, .{ .name = "floorl", .linkage = linkage }); |
| 682 | | 682 | |
| | 683 | @export(ceilf, .{ .name = "ceilf", .linkage = linkage }); |
| | 684 | @export(ceil, .{ .name = "ceil", .linkage = linkage }); |
| | 685 | @export(ceill, .{ .name = "ceill", .linkage = linkage }); |
| | 686 | |
| 683 | @export(fma, .{ .name = "fma", .linkage = linkage }); | 687 | @export(fma, .{ .name = "fma", .linkage = linkage }); |
| 684 | @export(fmaf, .{ .name = "fmaf", .linkage = linkage }); | 688 | @export(fmaf, .{ .name = "fmaf", .linkage = linkage }); |
| 685 | @export(fmal, .{ .name = "fmal", .linkage = linkage }); | 689 | @export(fmal, .{ .name = "fmal", .linkage = linkage }); |
| ... | @@ -811,6 +815,19 @@ fn floorl(x: c_longdouble) callconv(.C) c_longdouble { | ... | @@ -811,6 +815,19 @@ fn floorl(x: c_longdouble) callconv(.C) c_longdouble { |
| 811 | return math.floor(x); | 815 | return math.floor(x); |
| 812 | } | 816 | } |
| 813 | | 817 | |
| | 818 | fn ceilf(x: f32) callconv(.C) f32 { |
| | 819 | return math.ceil(x); |
| | 820 | } |
| | 821 | fn ceil(x: f64) callconv(.C) f64 { |
| | 822 | return math.ceil(x); |
| | 823 | } |
| | 824 | fn ceill(x: c_longdouble) callconv(.C) c_longdouble { |
| | 825 | if (!long_double_is_f128) { |
| | 826 | @panic("TODO implement this"); |
| | 827 | } |
| | 828 | return math.ceil(x); |
| | 829 | } |
| | 830 | |
| 814 | // Avoid dragging in the runtime safety mechanisms into this .o file, | 831 | // Avoid dragging in the runtime safety mechanisms into this .o file, |
| 815 | // unless we're trying to test this file. | 832 | // unless we're trying to test this file. |
| 816 | pub fn panic(msg: []const u8, error_return_trace: ?*std.builtin.StackTrace) noreturn { | 833 | pub fn panic(msg: []const u8, error_return_trace: ?*std.builtin.StackTrace) noreturn { |