More OPA conformance; in-progress: ability to trace interpreter (#63)

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
Anand Krishnamoorthi
2023-12-16 17:50:59 -08:00
committed by GitHub
parent 73ee18f002
commit 577e1aa8db
19 changed files with 428 additions and 172 deletions
+6
View File
@@ -282,6 +282,12 @@ impl Number {
}
}
pub fn is_positive(&self) -> bool {
match self {
Big(b) => b.d.is_sign_positive(),
}
}
fn ensure_integers(a: &Number, b: &Number) -> Option<(BigInt, BigInt)> {
match (a, b) {
(Big(a), Big(b)) if a.d.is_integer() && b.d.is_integer() => {