Arithmetic-operations
Leo arithmetic operations.
These operate on integers, field elements, and group elements.
But not every operator operates on all these types of values.
Since field operations depends on a prime number
and group operations depend on an elliptic curve.
The `curve` argument in the following functions is a unit type
that is used to look up the prime and elliptic curve;
see curve-parameterization.
For an operation that comes in non-wrapped and -wrapped forms,
the non-wrapped form can get an error due to an overflow
but the wrapped form will not. The exact handling of overflow
values depends on the operation.
Subtopics
- Integer-arithmetic-operations
- Leo integer arithmetic operations.
- Field-arithmetic-operations
- Leo field arithmetic operations.
- Scalar-field-arithmetic-operations
- Leo scalar field arithmetic operations.
- Group-arithmetic-operations
- Leo group arithmetic operations.
- Op-mul
- Leo multiplication operation.
- Op-add
- Leo addition operation.
- Op-sub-wrapped
- Leo wrapping subtraction operation.
- Op-sub
- Leo subtraction operation.
- Op-rem-wrapped
- Leo wrapping remainder operation.
- Op-pow-wrapped
- Leo wrapping exponentiation operation.
- Op-pow
- Leo exponentiation operation.
- Op-mul-wrapped
- Leo wrapping multiplication operation.
- Op-div-wrapped
- Leo wrapping division operation.
- Op-div
- Leo division operation.
- Op-add-wrapped
- Leo wrapping addition operation.
- Op-rem
- Leo remainder operation.
- Op-square-root
- Leo square root operation.
- Op-square
- Leo squaring operation.
- Op-neg
- Leo negation operation.
- Op-inv
- Leo inverse (reciprocal) operation.
- Op-double
- Leo double operation.
- Op-abs-wrapped
- Leo wrapped absolute value operation.
- Op-abs
- Leo absolute value operation.