-
Notifications
You must be signed in to change notification settings - Fork 149
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
Divide-by-zero and division overflow handling #498
Comments
It should be handled, for the division and remainder instructions Jolt uses "virtual sequences" (see Section 6.2 of the Jolt paper and this section of the Jolt book). This is where e.g. the |
@moodlezoup Oh thanks! The code already handled that. The Jolt paper didn't mention these The jolt/jolt-core/src/jolt/instruction/divu.rs Lines 230 to 232 in 0220448
|
Ah yes, nice catch. That method's only used in tests so not super urgent but will make a note to fix! |
According to the RISC-V spec, divide-by-zero and division overflow won't raise exception. Instead, it will return specific values.
In Jolt
DIV
,DIVU
,REM
, andREMU
instruction this is not handled. There isAssertValidDiv0Instruction
but it seems it is not used.The text was updated successfully, but these errors were encountered: