Skip to main content
All arithmetic operations work on euint8 | euint16 | euint32 | euint64 | euint128. Both operands must be the same type.

add

euint32 sum = FHE.add(a, b);

sub

euint32 diff = FHE.sub(a, b);

mul

euint32 product = FHE.mul(a, b);

div

Division by zero will cause the operation to revert.
euint32 quotient = FHE.div(a, b);

rem

euint32 remainder = FHE.rem(a, b);

square

euint32 squared = FHE.square(a);