You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'll add BinaryInteger/isPositive because arbitrary integers can do better than x > 0.
extensionBinaryInteger{
/// Indicates whether this value is greater than zero.
///
/// - Note: Big integers evaluate it in place, cf. `compared(to: 0)`.
///
@inlinablepublicvarisPositive:Bool{if !Self.isArbitrary {returnself>Self.zero
}elseifBool(self.appendix){return !Self.isSigned
}else{returnself.withUnsafeBinaryIntegerBody{
!$0.isZero
}}}}
Note
Req. arbitrary integer normalization (#26) might be useful here too.
I'll use this thread to document various minor changes.
The text was updated successfully, but these errors were encountered: