| ... | ... | @@ -98,6 +98,7 @@ comptime { |
| 98 | 98 | |
| 99 | 99 | @export(round, .{ .name = "round", .linkage = .Strong }); |
| 100 | 100 | @export(roundf, .{ .name = "roundf", .linkage = .Strong }); |
| 101 | @export(roundl, .{ .name = "roundl", .linkage = .Strong }); |
| 101 | 102 | |
| 102 | 103 | @export(fmin, .{ .name = "fmin", .linkage = .Strong }); |
| 103 | 104 | @export(fminf, .{ .name = "fminf", .linkage = .Strong }); |
| ... | ... | @@ -575,11 +576,18 @@ fn fabsf(a: f32) callconv(.C) f32 { |
| 575 | 576 | return math.fabs(a); |
| 576 | 577 | } |
| 577 | 578 | |
| 579 | fn roundf(a: f32) callconv(.C) f32 { |
| 580 | return math.round(a); |
| 581 | } |
| 582 | |
| 578 | 583 | fn round(a: f64) callconv(.C) f64 { |
| 579 | 584 | return math.round(a); |
| 580 | 585 | } |
| 581 | 586 | |
| 582 | | fn roundf(a: f32) callconv(.C) f32 { |
| 587 | fn roundl(a: c_longdouble) callconv(.C) c_longdouble { |
| 588 | if (!long_double_is_f128) { |
| 589 | @panic("TODO implement this"); |
| 590 | } |
| 583 | 591 | return math.round(a); |
| 584 | 592 | } |
| 585 | 593 | |