mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-21 08:35:40 +00:00
Implement FixedPoint trait. (#5877)
* Implement Fixed trait. * Fix tests * Fix tests * Fix tests 2 * Address review comment regarding from_i129. * Remove precision by using log10() as suggested in review. * Add small comments. * Use checked versions + panic for ops::*. * Remove repeated test. * Uncomment test. * Remove casts. * Add more comments. * Add tests. * Panic on saturating_div_int * More tests. * More docs. * Saturating renames. * Fix to_bound doc. * Move some impl to trait. * Add range * Add macro pre. * More round() tests. * Delete confusion. * More impl to trait * Add doc for fixedpoint op. * Remove trailing spaces. * Suggested docs changes. * More tests and comments for roundings. * Some quickcheck tests. * Add missing panic, more test/comments. * Nits. * Rename. * Remove primitives-types import. * Apply review suggestions * Fix long lines and add some fuzz. * fix long line * Update fuzzer * Bump impl * fix warnings Co-authored-by: Gavin Wood <gavin@parity.io> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
sp-arithmetic = { version = "2.0.0-dev", path = ".." }
|
||||
honggfuzz = "0.5"
|
||||
honggfuzz = "0.5.49"
|
||||
primitive-types = "0.7.0"
|
||||
num-bigint = "0.2"
|
||||
num-traits = "0.2"
|
||||
@@ -31,3 +31,7 @@ path = "src/per_thing_rational.rs"
|
||||
[[bin]]
|
||||
name = "rational128"
|
||||
path = "src/rational128.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "fixed"
|
||||
path = "src/fixed.rs"
|
||||
Reference in New Issue
Block a user