pub fn toPrimitive(self: Self, comptime T: type) (OverflowError || RepresentationError)!T self: SelfT: type332
333
334
335
336
337 pub fn toPrimitive(self: Self, comptime T: type) (OverflowError || RepresentationError)!T {
if (self.montgomery) {
return error.UnexpectedRepresentation;
}
return self.v.toPrimitive(T);
}
Converts the field element to a primitive. This function may not run in constant time. Returns an error if the element is in Montgomery form.