package polynomial
Polynomials over finite fields
Install
Dune Dependency
Authors
Maintainers
Sources
ocaml-polynomial-0.4.0.tar.gz
md5=0ec793314441a5a1106cdf57d1e09304
sha512=1b474604c31c152d0539f912c08fac0c41d61da0ffd27270f37d7121e851ac9cc4f03ca3bb061da266039189a92d4fb50eb0d366ade5814b62cfa03289310515
Description
Polynomials over finite fields
Published: 24 Nov 2022
README
ocaml-polynomial
Play with polynomial
Examples
Let's have an example with fields
opam switch create . 4.09.1
opam install . -y --with-test --deps-only
opam install . -y
opam install utop
dune utop
#require "ff";
module F379 = Ff.MakeFp(struct let prime_order = Z.of_int 379 end);;
module Poly379 = Polynomial.Make(F379);;
let points =
[ (F379.of_string "2", F379.of_string "3");
(F379.of_string "0", F379.of_string "1") ]
in
let interpolated_polynomial = Poly.lagrange_interpolation points in
assert (
Poly.equal
(Poly.of_coefficients
[ (F379.of_string "1", 1);
(F379.of_string "1", 0) ])
interpolated_polynomial )
JavaScript compatibility
This library can be transpiled in JavaScript using js_of_ocaml. An example is provided in js/test_js.ml
, with the corresponding dune
file.
How to help
Install merlin and ocamlformat.0.15.0
opam install merlin ocamlformat.0.15.0
Install
opam install polynomial
Coverage
opam install bisect_ppx -y
dune runtest --instrument-with bisect_ppx --force
bisect-ppx-report html
Dev Dependencies (6)
-
zarith_stubs_js
with-test
-
js_of_ocaml-ppx
with-test
-
js_of_ocaml
with-test
-
bisect_ppx
with-test & >= "2.5.0"
-
ff
with-test & >= "0.6.1" & < "0.7.0"
-
alcotest
with-test
Used by (2)
-
tezos-bls12-381-polynomial
>= "1.0.0"
-
tezos-plompiler
>= "1.0.0"
Conflicts
None
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page