-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
acceptedThis proposal is planned.This proposal is planned.contributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.This issue is limited in scope and/or knowledge of Zig internals.proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.This issue suggests modifications. If it also has the "accepted" label then it is planned.
Milestone
Description
This is a proposal to promote std.math.divCeil to a @divCeil builtin.
This discussion is very relevant: #15879 (comment)
The main reason here would be that if we have @divExact, @divFloor, and @divTrunc, we should have @divCeil too.
From the past, the only real argument against it in #4095 seems to be:
It should only be a builtin if this is something that has a matching instruction on some CPU. Otherwise it just goes into the standard library.
However, quoting @jacobly0:
I'm also not aware of a cpu with a
@divFloorinstruction
so the question is why isn't @divFloor demoted to a standard library function?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
acceptedThis proposal is planned.This proposal is planned.contributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.This issue is limited in scope and/or knowledge of Zig internals.proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.This issue suggests modifications. If it also has the "accepted" label then it is planned.