Module gadgets::util

source ·
Expand description

Utility traits, functions used in the crate.

Modules§

  • Returns 1 when expr[0] && expr[1] && ... == 1, and returns 0 otherwise. Inputs need to be boolean
  • Returns 1 when b == 0, and returns 0 otherwise. b needs to be boolean
  • Returns 1 when expr[0] || expr[1] || ... == 1, and returns 0 otherwise. Inputs need to be boolean
  • Returns the power of a number using straightforward multiplications
  • Returns when_true when selector == 1, and returns when_false when selector == 0. selector needs to be boolean.
  • Returns the sum of the passed in cells
  • Returns a ^ b. a and b needs to be boolean

Traits§

  • Trait that implements functionality to get a constant expression from commonly used types.
  • Trait that implements functionality to get a scalar from commonly used types.

Functions§

  • Given a bytes-representation of an expression, it computes and returns the single expression.
  • Returns 2**by as Field
  • Returns tuple consists of low and high part of U256
  • Split a U256 value into 4 64-bit limbs stored in U256 values.