Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

fix: Divide field by zero #485

Closed
wants to merge 1 commit into from
Closed

fix: Divide field by zero #485

wants to merge 1 commit into from

Conversation

Ethan-000
Copy link
Contributor

@Ethan-000 Ethan-000 commented Aug 12, 2023

Description

I don't know if this will fully resolve the issue. if the issue persists, i'll also change the code here

https://github.com/noir-lang/noir/blob/master/crates/noirc_evaluator/src/ssa/acir_gen/acir_ir/acir_variable.rs#L367-L382
https://github.com/noir-lang/noir/blob/master/crates/noirc_evaluator/src/ssa/acir_gen/acir_ir/acir_variable.rs#L203-L231

Problem*

Related to noir-lang/noir#2149

Summary*

Additional Context

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@Ethan-000
Copy link
Contributor Author

div_assign use inverse under the hood as well. perhaps its also worth considering whether inverse() in FieldElement should return an Option rather than defaulting to 0 if the value is None

@kevaundray
Copy link
Contributor

Can you diagnose the issue to see if it is fixed by this change?

@Ethan-000
Copy link
Contributor Author

this will return a called Option::unwrap()on aNone value error

i think i can add tried to change the error message once this is updated to noir

@Ethan-000 Ethan-000 closed this Aug 14, 2023
@Ethan-000 Ethan-000 reopened this Aug 14, 2023
@vezenovm
Copy link
Contributor

Closing as this is fixed as per: noir-lang/noir#2475

@vezenovm vezenovm closed this Aug 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants