Skip to content

Commit c35e889

Browse files
committed
signoff: u128::lt
1 parent 3a66965 commit c35e889

File tree

1 file changed

+20
-3
lines changed
  • tasm-lib/src/arithmetic/u128

1 file changed

+20
-3
lines changed

tasm-lib/src/arithmetic/u128/lt.rs

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,27 @@
1+
use std::collections::HashMap;
2+
13
use triton_vm::prelude::*;
24

35
use crate::prelude::*;
6+
use crate::traits::basic_snippet::Reviewer;
7+
use crate::traits::basic_snippet::SignOffFingerprint;
48

5-
/// Test Less-Than for `U128`s.
9+
/// Less-Than for `U128`s.
610
///
7-
/// Consumes arguments from stack and leaves a boolean behind. When the
8-
/// arguments are not 8 u32s, the behavior is undefined.
11+
/// ### Behavior
912
///
1013
/// ```text
1114
/// BEFORE: _ [rhs; 4] [lhs; 4]
1215
/// AFTER: _ (lhs < rhs)
1316
/// ```
17+
///
18+
/// ### Preconditions
19+
///
20+
/// - all input arguments are properly [`BFieldCodec`] encoded
21+
///
22+
/// ### Postconditions
23+
///
24+
/// - the output is properly [`BFieldCodec`] encoded
1425
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
1526
pub struct Lt;
1627

@@ -68,6 +79,12 @@ impl BasicSnippet for Lt {
6879
return
6980
}
7081
}
82+
83+
fn sign_offs(&self) -> HashMap<Reviewer, SignOffFingerprint> {
84+
let mut sign_offs = HashMap::new();
85+
sign_offs.insert(Reviewer("ferdinand"), 0x4e24d1cf57cfa49d.into());
86+
sign_offs
87+
}
7188
}
7289

7390
#[cfg(test)]

0 commit comments

Comments
 (0)