-
Notifications
You must be signed in to change notification settings - Fork 211
Open
Description
Currently, the only way to directly change the sign of a BigInt is to use.into_parts() and then BigInt::from_biguint(). It would be more convenient if we could directly set the sign, via a .set_sign() method or similar.
Especially for equations where terms of (-1)ⁿ are present, it would also be more convenient if there was a Mul<Sign> and MulAssign<Sign> impl so that one can e.g.
let minus_1_coef: Sign = Sign::Minus;
let answer: BigInt;
// ...
loop {
minus_1_coef = -minus_1_coef;
answer *= minus_1_coef;
// ...
}Rot127
Metadata
Metadata
Assignees
Labels
No labels