a9b1f58b00
Add saturating (unsigned) math operations and optimize try operations ( #5527 )
2025-02-27 10:03:54 +01:00
f999ba42a1
Add 512bits add and mult operations ( #5035 )
2025-02-26 11:04:14 +01:00
96e5c0830a
Deduplicate code in scripts/helpers and test/helpers/iterate ( #4895 )
...
Co-authored-by: ernestognw <ernestognw@gmail.com >
2024-02-15 17:40:48 -06:00
4e7e6e54da
Add bytes memory version of Math.modExp ( #4893 )
...
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com >
2024-02-14 10:06:34 +01:00
f8b1ddf591
Add variants of Array.sort for address[] and bytes32[] ( #4883 )
...
Co-authored-by: Ernesto García <ernestognw@gmail.com >
2024-02-12 16:34:07 +00:00
192e873fcb
Add Math.modExp and a Panic library ( #3298 )
...
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com >
Co-authored-by: ernestognw <ernestognw@gmail.com >
2024-02-02 18:40:00 +01:00
e86bb45477
Add a Math.inv function that inverse a number in Z/nZ ( #4839 )
...
Co-authored-by: ernestognw <ernestognw@gmail.com >
2024-01-24 09:57:24 +01:00
a72c9561b9
Finalize test migration: remove legacy dependencies and test helpers ( #4797 )
2023-12-26 23:46:06 +01:00
015ef69287
Refactor time helper and remove custom error helper. ( #4803 )
...
Co-authored-by: ernestognw <ernestognw@gmail.com >
2023-12-22 19:50:25 +00:00
cffb2f1ddc
Migrate math tests to ethers.js v6 ( #4769 )
...
Co-authored-by: Ernesto García <ernestognw@gmail.com >
2023-12-04 13:00:00 -06:00
84db204a41
Rename rounding modes and complete with fourth ( #4455 )
...
Co-authored-by: ernestognw <ernestognw@gmail.com >
2023-07-13 17:52:03 -03:00
2477534260
Change behavior of ceilDiv(0, 0) and improve test coverage ( #4348 )
2023-06-14 17:21:42 -03:00
0f10efe232
Remove code in preparation for v5.0 ( #4258 )
...
Co-authored-by: Ernesto García <ernestognw@gmail.com >
Co-authored-by: Francisco <fg@frang.io >
2023-05-19 22:48:05 +02:00
a28aafdc85
Use Prettier for JS files ( #3913 )
...
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com >
2023-01-04 15:03:40 +01:00
c1d9da4052
Use hardhat-exposed to reduce the need for mocks ( #3666 )
...
Co-authored-by: Francisco <fg@frang.io >
2023-01-03 14:38:13 +00:00
2336bd3e8e
Simplify ESLint config ( #3903 )
2022-12-29 17:08:12 -03:00
c1d6e39aab
Add log2, log10 and log256 functions ( #3670 )
2022-09-07 08:29:48 +00:00
3ac4add548
Add sqrt for math ( #3242 )
2022-06-07 08:26:45 +02:00
5e00787199
ERC4626 ( #3171 )
2022-06-02 10:03:03 +02:00
3eb2d43b06
Move abs(int256) from Math to SafeMath ( #3110 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2022-01-14 22:27:04 +00:00
f6db5c1f30
A function which returns the absolute value of a signed value ( #2984 )
...
* Add a function which returns the absolute (and obviously unsigned) value of a signed value.
* add changelog entry and fix lint
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com >
2021-11-24 14:09:05 +01:00
6d97f09195
Gas optimization on average function of Math.sol ( #2757 )
...
* change implementation to save gas
* add average test with two max uni256 number
2021-07-10 21:28:12 +02:00
7c754d0665
Add ceiling division operation to the Math.sol library ( #2681 )
...
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com >
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-05-20 13:53:31 +00:00
24a0bc23cf
Reorganize the repo structure ( #2503 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-02-22 16:44:16 +00:00