Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit af8d184

Browse files
committed
fix another case, quick tests passing
1 parent 561e6a7 commit af8d184

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/math/log.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,12 +308,15 @@ impl DInt64 {
308308
}
309309

310310
match self.cmp(&other) {
311-
Ordering::Less => {
311+
Ordering::Equal => {
312312
if (self.sign ^ other.sign) != 0 {
313313
return DInt64::ZERO;
314314
}
315+
let mut ret = self.clone();
316+
ret.ex += 1;
317+
return ret;
315318
}
316-
Ordering::Equal => {
319+
Ordering::Less => {
317320
return other.add(self);
318321
}
319322
Ordering::Greater => (),

0 commit comments

Comments
 (0)