-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(jolt-core): Fixes DIVU and REMU sequence_output #506
Conversation
We return the correct output from sequence output when the divisor is zero, for divu and remu.
From #498 I believe we just need to fix the sequence output (which is used in the jolt virtual sequence test macro) to be output uint::max when the divisor is zero. |
let quotient = if y == 0 { | ||
match WORD_SIZE { | ||
32 => u32::MAX as u64, | ||
64 => u64::MAX, | ||
_ => panic!("Unsupported WORD_SIZE: {}", WORD_SIZE), | ||
} | ||
} else { | ||
x / y | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's get rid of this and just move the existing match
into the else
block below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks Mihir!
We return the correct output from sequence output when the divisor is zero, for divu and remu.
Should fix #499