Module Gf.Make

Hardware implementations of the field arithmetic.

Parameters

Signature

include S
type t
val sexp_of_t : t -> Sexplib0.Sexp.t
include Ppx_compare_lib.Comparable.S with type t := t
val compare : t Base__Ppx_compare_lib.compare
include Ppx_compare_lib.Equal.S with type t := t
val equal : t Base__Ppx_compare_lib.equal

Constants

val modulus : t

Solinas prime 2^64 - 2^31 + 1

val zero : t
val one : t
val two : t

Arithmetic operations

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val negate : t -> t
module Hex : sig ... end

Misc

val num_bits : Base.int
val is_normalized : t -> Bits.t
val mul : ?pipe:( t -> t ) -> t -> t -> t
val to_bits : t -> Bits.t
val of_bits : Bits.t -> t
val of_z : Z.t -> t
val to_z : t -> Z.t