Skip to main content

Field

Model

Utilities

Model

Field

Signature

export 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
}

Details

  • Added in 0.1.0

License

  • MIT – Copyright (c) 2017-present Giulio Canti

Utilities

fieldNumber

Use Field instead.

Signature

export declare const fieldNumber: Field<number>

Details

  • Added in 0.1.0
  • Deprecated

License

  • MIT – Copyright (c) 2017-present Giulio Canti

gcd

The greatest common divisor of two values

Signature

export declare function gcd<A>(E: Eq<A>, field: Field<A>): (x: A, y: A) => A

Details

  • Added in 0.1.0

License

  • MIT – Copyright (c) 2017-present Giulio Canti

lcm

The least common multiple of two values

Signature

export declare function lcm<A>(E: Eq<A>, F: Field<A>): (x: A, y: A) => A

Details

  • Added in 0.1.0

License

  • MIT – Copyright (c) 2017-present Giulio Canti