mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
Thread through the divCeil implementation from Zig:
+ OPEN QUESTION: Evidently the Zig implementation can throw an overflow error. Do we want to do something in Roc to fix this?
This commit is contained in:
parent
4b65430bef
commit
0cc6e44d35
7 changed files with 79 additions and 3 deletions
|
@ -15,6 +15,10 @@ pub fn powInt(base: i64, exp: i64) callconv(.C) i64 {
|
|||
return @call(.{ .modifier = always_inline }, math.pow, .{ i64, base, exp });
|
||||
}
|
||||
|
||||
pub fn divCeil(numerator: i64, denominator: i64) callconv(.C) i64 {
|
||||
return @call(.{ .modifier = always_inline }, math.divCeil, .{ i64, numerator, denominator });
|
||||
}
|
||||
|
||||
pub fn acos(num: f64) callconv(.C) f64 {
|
||||
return @call(.{ .modifier = always_inline }, math.acos, .{num});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue