|
|
@@ -58,12 +58,10 @@ pub const FIXED_BASE_WINDOW_SIZE: usize = 3;
|
|
|
pub const H: usize = 1 << FIXED_BASE_WINDOW_SIZE;
|
|
|
|
|
|
/// Number of windows for a full-width scalar
|
|
|
-pub const NUM_WINDOWS: usize =
|
|
|
- (L_ORCHARD_SCALAR + FIXED_BASE_WINDOW_SIZE - 1) / FIXED_BASE_WINDOW_SIZE;
|
|
|
+pub const NUM_WINDOWS: usize = L_ORCHARD_SCALAR.div_ceil(FIXED_BASE_WINDOW_SIZE);
|
|
|
|
|
|
/// Number of windows for a short signed scalar
|
|
|
-pub const NUM_WINDOWS_SHORT: usize =
|
|
|
- (L_VALUE + FIXED_BASE_WINDOW_SIZE - 1) / FIXED_BASE_WINDOW_SIZE;
|
|
|
+pub const NUM_WINDOWS_SHORT: usize = L_VALUE.div_ceil(FIXED_BASE_WINDOW_SIZE);
|
|
|
|
|
|
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
|
|
|
// A sum type for both full-width and short bases. This enables us to use the
|