Package builtin defines MPCL builtin functions and types. This package is always imported and the functions and types can be used in all programs.
The floorPow2 built-in function returns the power of 2 number that is smaller than or equal to the argument value.
The len built-in function returns the length of the argument value, according to its type:
Array: the number of elements in the array String: the number of bytes in the string
The native built-in function loads native circuit from the named file. The circuit must be located in the same directory as the calling MPCL script. The native built-in function supports the following circuit formats:
.circ Bristol circuit format .mpclc compiled MPCL circuit format
The size built-in function returns the size of the argument value in bits. The argument value can be of any type.
bool is a boolean value true or false.
byte is an alias for unsigned 8-bit integer numbers.
intSize is a Size-bit signed integer number. The signed integer numbers can be instantiated in any bit sizes.
rune is an alias for int32.
stringSize defines Size-bit long string.
uintSize is a Size-bit unsigned integer number. The unsigned integer numbers can be instantiated in any bit sizes.