Interface FieldElement<E extends FieldElement<E>>

All Superinterfaces:
RingElement<E>
All Known Implementing Classes:
Complex, NativeRealBig, Rational, Real, RealBig, RealDouble, RealFloat

public interface FieldElement<E extends FieldElement<E>> extends RingElement<E>
Marker interface for elements of a field structure.

A field element extends ring element with division (multiplicative inverse). Every non-zero field element has a multiplicative inverse.

Field Axioms

In addition to ring axioms:

  • Every non-zero element has a multiplicative inverse
  • (F \ {0}, *) is an abelian group

Example Usage

Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Method Details

    • inverse

      E inverse()
      Returns the multiplicative inverse of this element.

      For any non-zero element e: e.multiply(e.inverse()) = e.one()

      Returns:
      1/this
      Throws:
      ArithmeticException - if this element is zero
    • divide

      default E divide(E other)
      Returns this element divided by another.

      Default implementation: this.multiply(other.inverse())

      Parameters:
      other - the divisor
      Returns:
      this / other
      Throws:
      ArithmeticException - if other is zero