-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Open
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Description
Feature gate: #![feature(signed_bigint_helpers)]
This issue continues discussion #85532 with the following methods on signed integers:
carrying_addborrowing_subcarrying_mulcarrying_mul_unsignedcarrying_mul_addcarrying_mul_unsigned_add
// On signed integers iN with unsigned uN counterparts:
/// `self + rhs + carry` (full adder)
fn carrying_add(self, rhs: Self, carry: bool) -> (Self, bool);
/// `self - rhs - carry` (full "subtractor")
fn borrowing_sub(self, rhs: Self, carry: bool) -> (Self, bool);
/// `self * rhs + carry`
fn carrying_mul(self, rhs: Self, carry: Self) -> (uN, Self);
/// `self * rhs + carry`
fn carrying_mul_unsigned(self, rhs: uN, carry: uN) -> (uN, Self);
/// `self * rhs + carry + add`
fn carrying_mul_add(self, rhs: Self, carry: Self, add: Self) -> (uN, Self);
/// `self * rhs + carry + add`
fn carrying_mul_unsigned_add(self, rhs: uN, carry: uN, add: Self) -> (uN, Self);bjoernager and joseluisbjoernager
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.