diff --git a/CHANGELOG.md b/CHANGELOG.md index 18e03b135..bddc83abe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ against this Rust version. - [added] docs.rs metadata and cfg options - [added] Playground metadata - [changed] Remove build scripts; instead check-in the built code +- [added] Constants for 3600 ### 1.16.0 (2022-12-05) - [added] `const INT` field to the `ToInt` trait. diff --git a/generate/src/main.rs b/generate/src/main.rs index 98a9b52c3..3823d9a67 100644 --- a/generate/src/main.rs +++ b/generate/src/main.rs @@ -43,7 +43,10 @@ const HIGHEST: u64 = 1024; fn uints() -> impl Iterator { let first2: u32 = (HIGHEST as f64).log(2.0).round() as u32 + 1; let first10: u32 = (HIGHEST as f64).log(10.0) as u32 + 1; + + let other_constants = [3600]; (0..(HIGHEST + 1)) + .chain(other_constants) .chain((first2..64).map(|i| 2u64.pow(i))) .chain((first10..20).map(|i| 10u64.pow(i))) } diff --git a/src/gen/consts.rs b/src/gen/consts.rs index ec08617db..0aafdd3a2 100644 --- a/src/gen/consts.rs +++ b/src/gen/consts.rs @@ -5061,6 +5061,24 @@ pub type U1024 = UInt< >; pub type P1024 = PInt; pub type N1024 = NInt; +pub type U3600 = UInt< + UInt< + UInt< + UInt< + UInt< + UInt, B1>, B1>, B0>, B0>, B0>, B0>, + B1, + >, + B0, + >, + B0, + >, + B0, + >, + B0, +>; +pub type P3600 = PInt; +pub type N3600 = NInt; pub type U2048 = UInt< UInt< UInt< diff --git a/src/gen/generic_const_mappings.rs b/src/gen/generic_const_mappings.rs index 12cebded5..99f4d8a2b 100644 --- a/src/gen/generic_const_mappings.rs +++ b/src/gen/generic_const_mappings.rs @@ -4155,6 +4155,10 @@ impl ToUInt for Const<1024> { type Output = U1024; } +impl ToUInt for Const<3600> { + type Output = U3600; +} + impl ToUInt for Const<2048> { type Output = U2048; }