noir-lang / noir

Noir is a domain specific language for zero knowledge proofs
https://noir-lang.org
Apache License 2.0
821 stars 177 forks source link

chore: improve `sqrt` in stdlib and fuzz #5293

Open TomAFrench opened 1 week ago

TomAFrench commented 1 week ago

Description

Problem*

Resolves

Summary*

This PR pushes the calculation in sqrt within the standard library into an unconstrained context where we just assert that the result multiplied by itself is equal to the input.

I've also added a fuzz test for this algorithm.

Additional Context

Documentation*

Check one:

PR Checklist*