Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add changeset
  • Loading branch information
Amxx committed Jan 17, 2024
commit 0408e142b2ddf1448f2f772cd6ec69bd65f53cee
5 changes: 5 additions & 0 deletions .changeset/cool-mangos-compare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'openzeppelin-solidity': minor
---

`Math`: add an `inv` function that inverse a number in Z/nZ
2 changes: 1 addition & 1 deletion contracts/utils/math/Math.sol
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ library Math {
}

/**
* @notice Calculate the inverse of a in Z/nZ.
* @notice Calculate the inverse of a number in Z/nZ.
*
* If p is a prime, then we Z/nZ is a field commonly noted Fp. In that case all elements are inversible, expect 0.
* If p is not a prime, then Z/nZ is not a field, and some elements might not be inversible.
Expand Down