FAAST
0.2.1
|
The element has no parent field specified. More...
Inherits FAAST::FAASTException.
The element has no parent field specified.
You are trying to make a field-dependent operation on an element for which no parent field has been specified yet.
A typical mistake leading to this exception is trying to assign or sum a scalar to a FieldElement before having made the FieldElement member of any Field.
In this example, after the creation x
is 0, but it does not belong to any field. You can add x
to any element of any field, or even to another generic 0 element, but you cannot add x
to a scalar since the library wouldn't know modulo which integer to reduce the scalar.
A correct example, assuming K
has been defined to be a field, would be
or, equivalently,