← Back

Source

Field

interface Field<A> extends Ring<A> {
  readonly degree: (a: A) => number
  readonly div: (x: A, y: A) => A
  readonly mod: (x: A, y: A) => A
}

Added in v1.0.0 (type class)

fieldNumber

Field<number>

Added in v1.0.0 (instance)

gcd

<A>(S: Setoid<A>, field: Field<A>): ((x: A, y: A) => A)

Added in v1.0.0 (function)

The greatest common divisor of two values

lcm

<A>(S: Setoid<A>, F: Field<A>): ((x: A, y: A) => A)

Added in v1.0.0 (function)

The least common multiple of two values