Skip to content

Commit

Permalink
Add constant for 3600 (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
paholg authored Feb 18, 2025
1 parent bab772b commit 9eec4b7
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 3 additions & 0 deletions generate/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ const HIGHEST: u64 = 1024;
fn uints() -> impl Iterator<Item = u64> {
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)))
}
Expand Down
18 changes: 18 additions & 0 deletions src/gen/consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5061,6 +5061,24 @@ pub type U1024 = UInt<
>;
pub type P1024 = PInt<U1024>;
pub type N1024 = NInt<U1024>;
pub type U3600 = UInt<
UInt<
UInt<
UInt<
UInt<
UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B1>, B0>, B0>, B0>, B0>,
B1,
>,
B0,
>,
B0,
>,
B0,
>,
B0,
>;
pub type P3600 = PInt<U3600>;
pub type N3600 = NInt<U3600>;
pub type U2048 = UInt<
UInt<
UInt<
Expand Down
4 changes: 4 additions & 0 deletions src/gen/generic_const_mappings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 9eec4b7

Please sign in to comment.