Skip to content

Commit

Permalink
Introduce max func
Browse files Browse the repository at this point in the history
  • Loading branch information
Sh0g0-1758 committed Sep 19, 2024
1 parent 307c881 commit 0ed6213
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/vm/builtins/modulo.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ type ModBuiltinRunner struct {
shiftPowers [N_WORDS]big.Int
}

func max(a, b uint) uint {
if a > b {
return a
}
return b
}

func (*ModBuiltinRunner) New(builtinType ModBuiltinType, included bool, instanceDef ModInstanceDef) *ModBuiltinRunner {
shift := new(big.Int).Lsh(big.NewInt(1), uint(instanceDef.wordBitLen))
shiftPowers := [N_WORDS]big.Int{}
Expand Down

0 comments on commit 0ed6213

Please sign in to comment.