-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(docs): Update v0.23.0 docs with retroactive doc updates (#4324)
# Description ## Problem\* Resolves #4200. ## Summary\* Copy updates introduced by the PRs listed in the Issue linked into the versioned v0.23.0 doc folder. Majority of the changes in this PR are merely direct copy-paste of updates from the individual PRs. Exception being minor path fixes. ## Documentation\* Check one: - [ ] No documentation needed. - [x] Documentation included in this PR. - [ ] **[Exceptional Case]** Documentation to be submitted in a separate PR. # PR Checklist\* - [x] I have tested the changes locally. - [x] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings.
- Loading branch information
Showing
18 changed files
with
388 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
docs/versioned_docs/version-v0.23.0/noir/standard_library/bn254.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
title: Bn254 Field Library | ||
--- | ||
|
||
Noir provides a module in standard library with some optimized functions for bn254 Fr in `std::field::bn254`. | ||
|
||
## decompose | ||
|
||
```rust | ||
fn decompose(x: Field) -> (Field, Field) {} | ||
``` | ||
|
||
Decomposes a single field into two fields, low and high. The low field contains the lower 16 bytes of the input field and the high field contains the upper 16 bytes of the input field. Both field results are range checked to 128 bits. | ||
|
||
|
||
## assert_gt | ||
|
||
```rust | ||
fn assert_gt(a: Field, b: Field) {} | ||
``` | ||
|
||
Asserts that a > b. This will generate less constraints than using `assert(gt(a, b))`. | ||
|
||
## assert_lt | ||
|
||
```rust | ||
fn assert_lt(a: Field, b: Field) {} | ||
``` | ||
|
||
Asserts that a < b. This will generate less constraints than using `assert(lt(a, b))`. | ||
|
||
## gt | ||
|
||
```rust | ||
fn gt(a: Field, b: Field) -> bool {} | ||
``` | ||
|
||
Returns true if a > b. | ||
|
||
## lt | ||
|
||
```rust | ||
fn lt(a: Field, b: Field) -> bool {} | ||
``` | ||
|
||
Returns true if a < b. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.