From e54f348c97294dd8e5db421503f5b09e95df8d8c Mon Sep 17 00:00:00 2001 From: Joel Dahne Date: Fri, 21 Apr 2023 14:54:58 +0200 Subject: [PATCH 01/12] Switch to Flint version 3 and remove Arb_jll dependency Flint version 3 merges all Arb with Flint (together with a lot of other packages). We therefore only have to depend on Flint now. --- Project.toml | 2 -- src/ArbCall/ArbFPWrapFunction.jl | 2 +- src/ArbCall/ArbFunction.jl | 2 +- src/Arblib.jl | 11 ++++++----- src/arb_types.jl | 6 +++--- src/calc_integrate.jl | 4 ++-- src/hash.jl | 2 +- src/manual_overrides.jl | 4 ++-- src/matrix.jl | 4 ++-- src/poly.jl | 4 ++-- src/ref.jl | 8 ++++---- src/show.jl | 4 ++-- src/special-functions.jl | 32 ++++++++++++++++---------------- src/vector.jl | 4 ++-- 14 files changed, 44 insertions(+), 45 deletions(-) diff --git a/Project.toml b/Project.toml index dd71e835..5055ec4f 100644 --- a/Project.toml +++ b/Project.toml @@ -4,7 +4,6 @@ authors = ["Marek Kaluba ", "Sascha Timme Date: Fri, 21 Apr 2023 14:56:38 +0200 Subject: [PATCH 02/12] Breaking change: Update poly structs for latest Flint version There was a breaking change in the order of the parameters. --- src/arb_types.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/arb_types.jl b/src/arb_types.jl index 1da78e9d..77734b08 100644 --- a/src/arb_types.jl +++ b/src/arb_types.jl @@ -130,8 +130,8 @@ end """ mutable struct arb_poly_struct coeffs::Ptr{arb_struct} - length::Int alloc::Int + length::Int function arb_poly_struct() poly = new() @@ -146,8 +146,8 @@ end """ mutable struct acb_poly_struct coeffs::Ptr{acb_struct} - length::Int alloc::Int + length::Int function acb_poly_struct() poly = new() From ab966265bcf78debb6344353d4270f567318ca6e Mon Sep 17 00:00:00 2001 From: Joel Dahne Date: Thu, 20 Jul 2023 20:33:26 +0200 Subject: [PATCH 03/12] Fix test for Flint 3 --- test/examples.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/examples.jl b/test/examples.jl index a0f4b0d8..5ced99a9 100644 --- a/test/examples.jl +++ b/test/examples.jl @@ -42,10 +42,10 @@ end str end == """ - Using 64 bits, sin(x) = [+/- 2.67e+859] - Using 128 bits, sin(x) = [+/- 1.30e+840] - Using 256 bits, sin(x) = [+/- 3.60e+801] - Using 512 bits, sin(x) = [+/- 3.01e+724] + Using 64 bits, sin(x) = [+/- 2.13e+859] + Using 128 bits, sin(x) = [+/- 1.15e+840] + Using 256 bits, sin(x) = [+/- 3.38e+801] + Using 512 bits, sin(x) = [+/- 2.92e+724] Using 1024 bits, sin(x) = [+/- 2.18e+570] Using 2048 bits, sin(x) = [+/- 1.22e+262] Using 4096 bits, sin(x) = [-0.7190842207 +/- 1.20e-11] From a4edd2b1ed210645a4a68ad1fa71cbf42d8be5b5 Mon Sep 17 00:00:00 2001 From: Joel Dahne Date: Sun, 23 Jul 2023 21:18:00 +0200 Subject: [PATCH 04/12] ArbCall: Update parsing for Flint 3 --- src/ArbCall/parse.jl | 59 ++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/src/ArbCall/parse.jl b/src/ArbCall/parse.jl index dfe3c3e7..c4c9b080 100644 --- a/src/ArbCall/parse.jl +++ b/src/ArbCall/parse.jl @@ -1,7 +1,7 @@ """ parse_arbdoc(filename) -Parse a `.rst` file from the Arb documentation. Returns the title of +Parse a `.rst` file from the Flint documentation. Returns the title of the document together with a list of sections with their titles and the functions documented in them as strings. @@ -177,45 +177,44 @@ function generate_file( end """ - parse_and_generate_arbdoc(arb_doc_dir, out_dir = "src/arbcalls/") + parse_and_generate_arbdoc(doc_dir, out_dir = "src/arbcalls/"; filenames, verbose) -Parses the Arb documentation and generates corresponding Julia files. -The value of `arb_doc_dir` should be a path to the directory -`doc/source/` in the Arb directory. +Parses the Flint documentation and generates corresponding Julia +files. The value of `doc_dir` should be a path to the directory +`doc/source/` in the Flint directory. + +The `filenames` argument can be given to specify specific doc files to +use. The `verbose` argument can be set to true to give more +information about the result of the parsing. """ function parse_and_generate_arbdoc( - arb_doc_dir, + doc_dir, out_dir = "src/arbcalls/"; - filenames = ( + filenames = [ + "mag", + "arf", + "acf", + "arb", "acb", - "acb_calc", - "acb_dft", - "acb_dirichlet", - "acb_elliptic", - "acb_hypgeom", - "acb_mat", - "acb_modular", + "arb_poly", "acb_poly", - "arb", - "arb_calc", "arb_fmpz_poly", - "arb_fpwrap", - "arb_hypgeom", + "acb_dft", "arb_mat", - "arb_poly", - "arf", + "acb_mat", + "acb_hypgeom", + "arb_hypgeom", + "acb_elliptic", + "acb_modular", + "acb_dirichlet", "bernoulli", - "bool_mat", - "dirichlet", - "dlog", - "double_interval", - #"fmpr", # Deprecated - "fmpz_extras", - "fmpzi", "hypgeom", - "mag", "partitions", - ), + "arb_calc", + "acb_calc", + "arb_fpwrap", + "fmpz_extras", + ], verbose = false, ) @@ -248,7 +247,7 @@ function parse_and_generate_arbdoc( for filename in filenames verbose && @info "Generating $filename.jl" - title, sections = parse_arbdoc(joinpath(arb_doc_dir, "$filename.rst")) + title, sections = parse_arbdoc(joinpath(doc_dir, "$filename.rst")) generate_file( joinpath(out_dir, "$filename.jl"), title, From 8880045379616a87c9b4ed39ce37f6ead072f65a Mon Sep 17 00:00:00 2001 From: Joel Dahne Date: Sun, 23 Jul 2023 21:20:18 +0200 Subject: [PATCH 05/12] Parse Flint 3 documentation on tag flint-3.0.0-alpha1 --- src/Arblib.jl | 7 ++-- src/arbcalls/acb_poly.jl | 20 ++---------- src/arbcalls/acf.jl | 28 ++++++++++++++++ src/arbcalls/arb.jl | 3 ++ src/arbcalls/arb_fpwrap.jl | 2 ++ src/arbcalls/arb_poly.jl | 20 ++---------- src/arbcalls/arf.jl | 5 +-- src/arbcalls/bernoulli.jl | 2 +- src/arbcalls/bool_mat.jl | 58 --------------------------------- src/arbcalls/dirichlet.jl | 55 ------------------------------- src/arbcalls/dlog.jl | 49 ---------------------------- src/arbcalls/double_interval.jl | 30 ----------------- src/arbcalls/fmpz_extras.jl | 3 -- src/arbcalls/fmpzi.jl | 26 --------------- src/arbcalls/mag.jl | 2 -- 15 files changed, 43 insertions(+), 267 deletions(-) create mode 100644 src/arbcalls/acf.jl delete mode 100644 src/arbcalls/bool_mat.jl delete mode 100644 src/arbcalls/dirichlet.jl delete mode 100644 src/arbcalls/dlog.jl delete mode 100644 src/arbcalls/double_interval.jl delete mode 100644 src/arbcalls/fmpzi.jl diff --git a/src/Arblib.jl b/src/Arblib.jl index d6db49df..f504870b 100644 --- a/src/Arblib.jl +++ b/src/Arblib.jl @@ -87,11 +87,12 @@ include("special-functions.jl") include("arbcalls/mag.jl") include("arbcalls/arf.jl") +include("arbcalls/acf.jl") include("arbcalls/arb.jl") include("arbcalls/acb.jl") include("arbcalls/arb_poly.jl") -include("arbcalls/arb_fmpz_poly.jl") include("arbcalls/acb_poly.jl") +include("arbcalls/arb_fmpz_poly.jl") include("arbcalls/acb_dft.jl") include("arbcalls/arb_mat.jl") include("arbcalls/acb_mat.jl") @@ -99,7 +100,6 @@ include("arbcalls/acb_hypgeom.jl") include("arbcalls/arb_hypgeom.jl") include("arbcalls/acb_elliptic.jl") include("arbcalls/acb_modular.jl") -include("arbcalls/dirichlet.jl") include("arbcalls/acb_dirichlet.jl") include("arbcalls/bernoulli.jl") include("arbcalls/hypgeom.jl") @@ -107,10 +107,7 @@ include("arbcalls/partitions.jl") include("arbcalls/arb_calc.jl") include("arbcalls/acb_calc.jl") include("arbcalls/arb_fpwrap.jl") -include("arbcalls/double_interval.jl") include("arbcalls/fmpz_extras.jl") -include("arbcalls/bool_mat.jl") -include("arbcalls/dlog.jl") include("arbcalls/eigen.jl") end # module diff --git a/src/arbcalls/acb_poly.jl b/src/arbcalls/acb_poly.jl index 1528bcb1..1bc1c87a 100644 --- a/src/arbcalls/acb_poly.jl +++ b/src/arbcalls/acb_poly.jl @@ -99,24 +99,10 @@ arbcall"int acb_poly_divrem(acb_poly_t Q, acb_poly_t R, const acb_poly_t A, cons arbcall"void _acb_poly_div_root(acb_ptr Q, acb_t R, acb_srcptr A, slong len, const acb_t c, slong prec)" ### Composition -arbcall"void _acb_poly_taylor_shift_horner(acb_ptr g, const acb_t c, slong n, slong prec)" -arbcall"void acb_poly_taylor_shift_horner(acb_poly_t g, const acb_poly_t f, const acb_t c, slong prec)" -arbcall"void _acb_poly_taylor_shift_divconquer(acb_ptr g, const acb_t c, slong n, slong prec)" -arbcall"void acb_poly_taylor_shift_divconquer(acb_poly_t g, const acb_poly_t f, const acb_t c, slong prec)" -arbcall"void _acb_poly_taylor_shift_convolution(acb_ptr g, const acb_t c, slong n, slong prec)" -arbcall"void acb_poly_taylor_shift_convolution(acb_poly_t g, const acb_poly_t f, const acb_t c, slong prec)" arbcall"void _acb_poly_taylor_shift(acb_ptr g, const acb_t c, slong n, slong prec)" arbcall"void acb_poly_taylor_shift(acb_poly_t g, const acb_poly_t f, const acb_t c, slong prec)" -arbcall"void _acb_poly_compose_horner(acb_ptr res, acb_srcptr poly1, slong len1, acb_srcptr poly2, slong len2, slong prec)" -arbcall"void acb_poly_compose_horner(acb_poly_t res, const acb_poly_t poly1, const acb_poly_t poly2, slong prec)" -arbcall"void _acb_poly_compose_divconquer(acb_ptr res, acb_srcptr poly1, slong len1, acb_srcptr poly2, slong len2, slong prec)" -arbcall"void acb_poly_compose_divconquer(acb_poly_t res, const acb_poly_t poly1, const acb_poly_t poly2, slong prec)" arbcall"void _acb_poly_compose(acb_ptr res, acb_srcptr poly1, slong len1, acb_srcptr poly2, slong len2, slong prec)" arbcall"void acb_poly_compose(acb_poly_t res, const acb_poly_t poly1, const acb_poly_t poly2, slong prec)" -arbcall"void _acb_poly_compose_series_horner(acb_ptr res, acb_srcptr poly1, slong len1, acb_srcptr poly2, slong len2, slong n, slong prec)" -arbcall"void acb_poly_compose_series_horner(acb_poly_t res, const acb_poly_t poly1, const acb_poly_t poly2, slong n, slong prec)" -arbcall"void _acb_poly_compose_series_brent_kung(acb_ptr res, acb_srcptr poly1, slong len1, acb_srcptr poly2, slong len2, slong n, slong prec)" -arbcall"void acb_poly_compose_series_brent_kung(acb_poly_t res, const acb_poly_t poly1, const acb_poly_t poly2, slong n, slong prec)" arbcall"void _acb_poly_compose_series(acb_ptr res, acb_srcptr poly1, slong len1, acb_srcptr poly2, slong len2, slong n, slong prec)" arbcall"void acb_poly_compose_series(acb_poly_t res, const acb_poly_t poly1, const acb_poly_t poly2, slong n, slong prec)" arbcall"void _acb_poly_revert_series_lagrange(acb_ptr h, acb_srcptr f, slong flen, slong n, slong prec)" @@ -169,6 +155,8 @@ arbcall"void acb_poly_interpolate_fast(acb_poly_t poly, acb_srcptr xs, acb_srcpt ### Differentiation arbcall"void _acb_poly_derivative(acb_ptr res, acb_srcptr poly, slong len, slong prec)" arbcall"void acb_poly_derivative(acb_poly_t res, const acb_poly_t poly, slong prec)" +arbcall"void _acb_poly_nth_derivative(acb_ptr res, acb_srcptr poly, ulong n, slong len, slong prec)" +arbcall"void acb_poly_nth_derivative(acb_poly_t res, const acb_poly_t poly, ulong n, slong prec)" arbcall"void _acb_poly_integral(acb_ptr res, acb_srcptr poly, slong len, slong prec)" arbcall"void acb_poly_integral(acb_poly_t res, const acb_poly_t poly, slong prec)" @@ -211,10 +199,6 @@ arbcall"void _acb_poly_exp_series(acb_ptr f, acb_srcptr h, slong hlen, slong n, arbcall"void acb_poly_exp_series(acb_poly_t f, const acb_poly_t h, slong n, slong prec)" arbcall"void _acb_poly_exp_pi_i_series(acb_ptr f, acb_srcptr h, slong hlen, slong n, slong prec)" arbcall"void acb_poly_exp_pi_i_series(acb_poly_t f, const acb_poly_t h, slong n, slong prec)" -arbcall"void _acb_poly_sin_cos_series_basecase(acb_ptr s, acb_ptr c, acb_srcptr h, slong hlen, slong n, slong prec, int times_pi)" -arbcall"void acb_poly_sin_cos_series_basecase(acb_poly_t s, acb_poly_t c, const acb_poly_t h, slong n, slong prec, int times_pi)" -arbcall"void _acb_poly_sin_cos_series_tangent(acb_ptr s, acb_ptr c, acb_srcptr h, slong hlen, slong n, slong prec, int times_pi)" -arbcall"void acb_poly_sin_cos_series_tangent(acb_poly_t s, acb_poly_t c, const acb_poly_t h, slong n, slong prec, int times_pi)" arbcall"void _acb_poly_sin_cos_series(acb_ptr s, acb_ptr c, acb_srcptr h, slong hlen, slong n, slong prec)" arbcall"void acb_poly_sin_cos_series(acb_poly_t s, acb_poly_t c, const acb_poly_t h, slong n, slong prec)" arbcall"void _acb_poly_sin_series(acb_ptr s, acb_srcptr h, slong hlen, slong n, slong prec)" diff --git a/src/arbcalls/acf.jl b/src/arbcalls/acf.jl new file mode 100644 index 00000000..7a46799b --- /dev/null +++ b/src/arbcalls/acf.jl @@ -0,0 +1,28 @@ +### +### **acf.h** -- complex floating-point numbers +### + +### Types, macros and constants + +### Memory management +#ni arbcall"void acf_init(acf_t x)" +#ni arbcall"void acf_clear(acf_t x)" +#ni arbcall"void acf_swap(acf_t z, acf_t x)" +#ni arbcall"slong acf_allocated_bytes(const acf_t x)" + +### Basic manipulation +#ni arbcall"arf_ptr acf_real_ptr(acf_t z)" +#ni arbcall"arf_ptr acf_imag_ptr(acf_t z)" +#ni arbcall"void acf_set(acf_t z, const acf_t x)" +#ni arbcall"int acf_equal(const acf_t x, const acf_t y)" + +### Arithmetic +#ni arbcall"int acf_add(acf_t res, const acf_t x, const acf_t y, slong prec, arf_rnd_t rnd)" +#ni arbcall"int acf_sub(acf_t res, const acf_t x, const acf_t y, slong prec, arf_rnd_t rnd)" +#ni arbcall"int acf_mul(acf_t res, const acf_t x, const acf_t y, slong prec, arf_rnd_t rnd)" + +### Approximate arithmetic +#ni arbcall"void acf_approx_inv(acf_t res, const acf_t x, slong prec, arf_rnd_t rnd)" +#ni arbcall"void acf_approx_div(acf_t res, const acf_t x, const acf_t y, slong prec, arf_rnd_t rnd)" +#ni arbcall"void acf_approx_sqrt(acf_t res, const acf_t x, slong prec, arf_rnd_t rnd)" +#ni arbcall"void acf_approx_dot(acf_t res, const acf_t initial, int subtract, acf_srcptr x, slong xstep, acf_srcptr y, slong ystep, slong len, slong prec, arf_rnd_t rnd)" diff --git a/src/arbcalls/arb.jl b/src/arbcalls/arb.jl index b71b4d0e..a08c4277 100644 --- a/src/arbcalls/arb.jl +++ b/src/arbcalls/arb.jl @@ -93,6 +93,8 @@ arbcall"void arb_trim(arb_t y, const arb_t x)" #ni arbcall"int arb_get_unique_fmpz(fmpz_t z, const arb_t x)" arbcall"void arb_floor(arb_t y, const arb_t x, slong prec)" arbcall"void arb_ceil(arb_t y, const arb_t x, slong prec)" +arbcall"void arb_trunc(arb_t y, const arb_t x, slong prec)" +arbcall"void arb_nint(arb_t y, const arb_t x, slong prec)" #ni arbcall"void arb_get_fmpz_mid_rad_10exp(fmpz_t mid, fmpz_t rad, fmpz_t exp, const arb_t x, slong n)" #mo arbcall"int arb_can_round_arf(const arb_t x, slong prec, arf_rnd_t rnd)" # clashes with arb_can_round_mpfr #mo arbcall"int arb_can_round_mpfr(const arb_t x, slong prec, mpfr_rnd_t rnd)" # clashes with arb_can_round_arf @@ -136,6 +138,7 @@ arbcall"int arb_ge(const arb_t x, const arb_t y)" arbcall"void arb_neg(arb_t y, const arb_t x)" arbcall"void arb_neg_round(arb_t y, const arb_t x, slong prec)" arbcall"void arb_abs(arb_t y, const arb_t x)" +arbcall"void arb_nonnegative_abs(arb_t y, const arb_t x)" arbcall"void arb_sgn(arb_t y, const arb_t x)" arbcall"int arb_sgn_nonzero(const arb_t x)" arbcall"void arb_min(arb_t z, const arb_t x, const arb_t y, slong prec)" diff --git a/src/arbcalls/arb_fpwrap.jl b/src/arbcalls/arb_fpwrap.jl index 3081aafb..b251ba96 100644 --- a/src/arbcalls/arb_fpwrap.jl +++ b/src/arbcalls/arb_fpwrap.jl @@ -123,6 +123,8 @@ arbfpwrapcall"int arb_fpwrap_double_cosh_integral(double * res, double x, int fl arbfpwrapcall"int arb_fpwrap_cdouble_cosh_integral(complex_double * res, complex_double x, int flags)" arbfpwrapcall"int arb_fpwrap_double_log_integral(double * res, double x, int offset, int flags)" arbfpwrapcall"int arb_fpwrap_cdouble_log_integral(complex_double * res, complex_double x, int offset, int flags)" +arbfpwrapcall"int arb_fpwrap_double_dilog(double * res, double x, int flags)" +arbfpwrapcall"int arb_fpwrap_cdouble_dilog(complex_double * res, complex_double x, int flags)" arbfpwrapcall"int arb_fpwrap_double_bessel_j(double * res, double nu, double x, int flags)" arbfpwrapcall"int arb_fpwrap_cdouble_bessel_j(complex_double * res, complex_double nu, complex_double x, int flags)" arbfpwrapcall"int arb_fpwrap_double_bessel_y(double * res, double nu, double x, int flags)" diff --git a/src/arbcalls/arb_poly.jl b/src/arbcalls/arb_poly.jl index 2acfe696..f483dc91 100644 --- a/src/arbcalls/arb_poly.jl +++ b/src/arbcalls/arb_poly.jl @@ -91,24 +91,10 @@ arbcall"int arb_poly_divrem(arb_poly_t Q, arb_poly_t R, const arb_poly_t A, cons arbcall"void _arb_poly_div_root(arb_ptr Q, arb_t R, arb_srcptr A, slong len, const arb_t c, slong prec)" ### Composition -arbcall"void _arb_poly_taylor_shift_horner(arb_ptr g, const arb_t c, slong n, slong prec)" -arbcall"void arb_poly_taylor_shift_horner(arb_poly_t g, const arb_poly_t f, const arb_t c, slong prec)" -arbcall"void _arb_poly_taylor_shift_divconquer(arb_ptr g, const arb_t c, slong n, slong prec)" -arbcall"void arb_poly_taylor_shift_divconquer(arb_poly_t g, const arb_poly_t f, const arb_t c, slong prec)" -arbcall"void _arb_poly_taylor_shift_convolution(arb_ptr g, const arb_t c, slong n, slong prec)" -arbcall"void arb_poly_taylor_shift_convolution(arb_poly_t g, const arb_poly_t f, const arb_t c, slong prec)" arbcall"void _arb_poly_taylor_shift(arb_ptr g, const arb_t c, slong n, slong prec)" arbcall"void arb_poly_taylor_shift(arb_poly_t g, const arb_poly_t f, const arb_t c, slong prec)" -arbcall"void _arb_poly_compose_horner(arb_ptr res, arb_srcptr poly1, slong len1, arb_srcptr poly2, slong len2, slong prec)" -arbcall"void arb_poly_compose_horner(arb_poly_t res, const arb_poly_t poly1, const arb_poly_t poly2, slong prec)" -arbcall"void _arb_poly_compose_divconquer(arb_ptr res, arb_srcptr poly1, slong len1, arb_srcptr poly2, slong len2, slong prec)" -arbcall"void arb_poly_compose_divconquer(arb_poly_t res, const arb_poly_t poly1, const arb_poly_t poly2, slong prec)" arbcall"void _arb_poly_compose(arb_ptr res, arb_srcptr poly1, slong len1, arb_srcptr poly2, slong len2, slong prec)" arbcall"void arb_poly_compose(arb_poly_t res, const arb_poly_t poly1, const arb_poly_t poly2, slong prec)" -arbcall"void _arb_poly_compose_series_horner(arb_ptr res, arb_srcptr poly1, slong len1, arb_srcptr poly2, slong len2, slong n, slong prec)" -arbcall"void arb_poly_compose_series_horner(arb_poly_t res, const arb_poly_t poly1, const arb_poly_t poly2, slong n, slong prec)" -arbcall"void _arb_poly_compose_series_brent_kung(arb_ptr res, arb_srcptr poly1, slong len1, arb_srcptr poly2, slong len2, slong n, slong prec)" -arbcall"void arb_poly_compose_series_brent_kung(arb_poly_t res, const arb_poly_t poly1, const arb_poly_t poly2, slong n, slong prec)" arbcall"void _arb_poly_compose_series(arb_ptr res, arb_srcptr poly1, slong len1, arb_srcptr poly2, slong len2, slong n, slong prec)" arbcall"void arb_poly_compose_series(arb_poly_t res, const arb_poly_t poly1, const arb_poly_t poly2, slong n, slong prec)" arbcall"void _arb_poly_revert_series_lagrange(arb_ptr h, arb_srcptr f, slong flen, slong n, slong prec)" @@ -175,6 +161,8 @@ arbcall"void arb_poly_interpolate_fast(arb_poly_t poly, arb_srcptr xs, arb_srcpt ### Differentiation arbcall"void _arb_poly_derivative(arb_ptr res, arb_srcptr poly, slong len, slong prec)" arbcall"void arb_poly_derivative(arb_poly_t res, const arb_poly_t poly, slong prec)" +arbcall"void _arb_poly_nth_derivative(arb_ptr res, arb_srcptr poly, ulong n, slong len, slong prec)" +arbcall"void arb_poly_nth_derivative(arb_poly_t res, const arb_poly_t poly, slong prec)" arbcall"void _arb_poly_integral(arb_ptr res, arb_srcptr poly, slong len, slong prec)" arbcall"void arb_poly_integral(arb_poly_t res, const arb_poly_t poly, slong prec)" @@ -219,10 +207,6 @@ arbcall"void _arb_poly_exp_series_basecase(arb_ptr f, arb_srcptr h, slong hlen, arbcall"void arb_poly_exp_series_basecase(arb_poly_t f, const arb_poly_t h, slong n, slong prec)" arbcall"void _arb_poly_exp_series(arb_ptr f, arb_srcptr h, slong hlen, slong n, slong prec)" arbcall"void arb_poly_exp_series(arb_poly_t f, const arb_poly_t h, slong n, slong prec)" -arbcall"void _arb_poly_sin_cos_series_basecase(arb_ptr s, arb_ptr c, arb_srcptr h, slong hlen, slong n, slong prec, int times_pi)" -arbcall"void arb_poly_sin_cos_series_basecase(arb_poly_t s, arb_poly_t c, const arb_poly_t h, slong n, slong prec, int times_pi)" -arbcall"void _arb_poly_sin_cos_series_tangent(arb_ptr s, arb_ptr c, arb_srcptr h, slong hlen, slong n, slong prec, int times_pi)" -arbcall"void arb_poly_sin_cos_series_tangent(arb_poly_t s, arb_poly_t c, const arb_poly_t h, slong n, slong prec, int times_pi)" arbcall"void _arb_poly_sin_cos_series(arb_ptr s, arb_ptr c, arb_srcptr h, slong hlen, slong n, slong prec)" arbcall"void arb_poly_sin_cos_series(arb_poly_t s, arb_poly_t c, const arb_poly_t h, slong n, slong prec)" arbcall"void _arb_poly_sin_series(arb_ptr s, arb_srcptr h, slong hlen, slong n, slong prec)" diff --git a/src/arbcalls/arf.jl b/src/arbcalls/arf.jl index 98ff2a40..76023a44 100644 --- a/src/arbcalls/arf.jl +++ b/src/arbcalls/arf.jl @@ -32,7 +32,6 @@ arbcall"void arf_set_mpz(arf_t res, const mpz_t x)" arbcall"void arf_set_ui(arf_t res, ulong x)" arbcall"void arf_set_si(arf_t res, slong x)" arbcall"void arf_set_mpfr(arf_t res, const mpfr_t x)" -#ns arbcall"void arf_set_fmpr(arf_t res, const fmpr_t x)" arbcall"void arf_set_d(arf_t res, double x)" arbcall"void arf_swap(arf_t x, arf_t y)" arbcall"void arf_init_set_ui(arf_t res, ulong x)" @@ -49,7 +48,6 @@ arbcall"void arf_set_ui_2exp_si(arf_t res, ulong m, slong e)" #ni arbcall"void arf_get_fmpz_2exp(fmpz_t m, fmpz_t e, const arf_t x)" #ni arbcall"void arf_frexp(arf_t m, fmpz_t e, const arf_t x)" #mo arbcall"double arf_get_d(const arf_t x, arf_rnd_t rnd)" # clashes with arf_get_si -#ns arbcall"void arf_get_fmpr(fmpr_t res, const arf_t x)" arbcall"int arf_get_mpfr(mpfr_t res, const arf_t x, mpfr_rnd_t rnd)" #ni arbcall"int arf_get_fmpz(fmpz_t res, const arf_t x, arf_rnd_t rnd)" #mo arbcall"slong arf_get_si(const arf_t x, arf_rnd_t rnd)" # clashes with arf_get_d @@ -154,6 +152,9 @@ arbcall"int arf_sosq(arf_t res, const arf_t x, const arf_t y, slong prec, arf_rn ### Summation #ni arbcall"int arf_sum(arf_t res, arf_srcptr terms, slong len, slong prec, arf_rnd_t rnd)" +### Dot products +#ni arbcall"void arf_approx_dot(arf_t res, const arf_t initial, int subtract, arf_srcptr x, slong xstep, arf_srcptr y, slong ystep, slong len, slong prec, arf_rnd_t rnd)" + ### Division arbcall"int arf_div(arf_t res, const arf_t x, const arf_t y, slong prec, arf_rnd_t rnd)" arbcall"int arf_div_ui(arf_t res, const arf_t x, ulong y, slong prec, arf_rnd_t rnd)" diff --git a/src/arbcalls/bernoulli.jl b/src/arbcalls/bernoulli.jl index bf63dd0a..5f3f3a5a 100644 --- a/src/arbcalls/bernoulli.jl +++ b/src/arbcalls/bernoulli.jl @@ -6,7 +6,7 @@ #ni arbcall"void bernoulli_rev_init(bernoulli_rev_t iter, ulong n)" #ni arbcall"void bernoulli_rev_next(fmpz_t numer, fmpz_t denom, bernoulli_rev_t iter)" #ni arbcall"void bernoulli_rev_clear(bernoulli_rev_t iter)" -#ni arbcall"void bernoulli_fmpq_vec_no_cache(fmpq * res, ulong a, slong num)" +#ni arbcall"void bernoulli_fmpq_vec_no_cache(fmpq_t * res, ulong a, slong num)" ### Caching arbcall"void bernoulli_cache_compute(slong n)" diff --git a/src/arbcalls/bool_mat.jl b/src/arbcalls/bool_mat.jl deleted file mode 100644 index 1f3197a9..00000000 --- a/src/arbcalls/bool_mat.jl +++ /dev/null @@ -1,58 +0,0 @@ -### -### **bool_mat.h** -- matrices over booleans -### - -### Types, macros and constants -#ns arbcall"int bool_mat_get_entry(const bool_mat_t mat, slong i, slong j)" -#ns arbcall"void bool_mat_set_entry(bool_mat_t mat, slong i, slong j, int x)" - -### Memory management -#ns arbcall"void bool_mat_init(bool_mat_t mat, slong r, slong c)" -#ns arbcall"void bool_mat_clear(bool_mat_t mat)" -#ns arbcall"int bool_mat_is_empty(const bool_mat_t mat)" -#ns arbcall"int bool_mat_is_square(const bool_mat_t mat)" - -### Conversions -#ns arbcall"void bool_mat_set(bool_mat_t dest, const bool_mat_t src)" - -### Input and output -#ns arbcall"void bool_mat_print(const bool_mat_t mat)" -#ns arbcall"void bool_mat_fprint(FILE * file, const bool_mat_t mat)" - -### Value comparisons -#ns arbcall"int bool_mat_equal(const bool_mat_t mat1, const bool_mat_t mat2)" -#ns arbcall"int bool_mat_any(const bool_mat_t mat)" -#ns arbcall"int bool_mat_all(const bool_mat_t mat)" -#ns arbcall"int bool_mat_is_diagonal(const bool_mat_t A)" -#ns arbcall"int bool_mat_is_lower_triangular(const bool_mat_t A)" -#ns arbcall"int bool_mat_is_transitive(const bool_mat_t mat)" -#ns arbcall"int bool_mat_is_nilpotent(const bool_mat_t A)" - -### Random generation -#ns arbcall"void bool_mat_randtest(bool_mat_t mat, flint_rand_t state)" -#ns arbcall"void bool_mat_randtest_diagonal(bool_mat_t mat, flint_rand_t state)" -#ns arbcall"void bool_mat_randtest_nilpotent(bool_mat_t mat, flint_rand_t state)" - -### Special matrices -#ns arbcall"void bool_mat_zero(bool_mat_t mat)" -#ns arbcall"void bool_mat_one(bool_mat_t mat)" -#ns arbcall"void bool_mat_directed_path(bool_mat_t A)" -#ns arbcall"void bool_mat_directed_cycle(bool_mat_t A)" - -### Transpose -#ns arbcall"void bool_mat_transpose(bool_mat_t dest, const bool_mat_t src)" - -### Arithmetic -#ns arbcall"void bool_mat_complement(bool_mat_t B, const bool_mat_t A)" -#ns arbcall"void bool_mat_add(bool_mat_t res, const bool_mat_t mat1, const bool_mat_t mat2)" -#ns arbcall"void bool_mat_mul(bool_mat_t res, const bool_mat_t mat1, const bool_mat_t mat2)" -#ns arbcall"void bool_mat_mul_entrywise(bool_mat_t res, const bool_mat_t mat1, const bool_mat_t mat2)" -#ns arbcall"void bool_mat_sqr(bool_mat_t B, const bool_mat_t A)" -#ns arbcall"void bool_mat_pow_ui(bool_mat_t B, const bool_mat_t A, ulong exp)" - -### Special functions -#ns arbcall"int bool_mat_trace(const bool_mat_t mat)" -#ns arbcall"slong bool_mat_nilpotency_degree(const bool_mat_t A)" -#ns arbcall"void bool_mat_transitive_closure(bool_mat_t B, const bool_mat_t A)" -#ns arbcall"slong bool_mat_get_strongly_connected_components(slong * p, const bool_mat_t A)" -#ni arbcall"slong bool_mat_all_pairs_longest_walk(fmpz_mat_t B, const bool_mat_t A)" diff --git a/src/arbcalls/dirichlet.jl b/src/arbcalls/dirichlet.jl deleted file mode 100644 index 3ea6787f..00000000 --- a/src/arbcalls/dirichlet.jl +++ /dev/null @@ -1,55 +0,0 @@ -### -### **dirichlet.h** -- Dirichlet characters -### - -### Dirichlet characters - -### Multiplicative group modulo *q* -#ni arbcall"void dirichlet_group_init(dirichlet_group_t G, ulong q)" -#ni arbcall"void dirichlet_subgroup_init(dirichlet_group_t H, const dirichlet_group_t G, ulong h)" -#ni arbcall"void dirichlet_group_clear(dirichlet_group_t G)" -#ni arbcall"ulong dirichlet_group_size(const dirichlet_group_t G)" -#ni arbcall"ulong dirichlet_group_num_primitive(const dirichlet_group_t G)" -#ni arbcall"void dirichlet_group_dlog_precompute(dirichlet_group_t G, ulong num)" -#ni arbcall"void dirichlet_group_dlog_clear(dirichlet_group_t G, ulong num)" - -### Character type -#ni arbcall"void dirichlet_char_init(dirichlet_char_t chi, const dirichlet_group_t G)" -#ni arbcall"void dirichlet_char_clear(dirichlet_char_t chi)" -#ni arbcall"void dirichlet_char_print(const dirichlet_group_t G, const dirichlet_char_t chi)" -#ni arbcall"void dirichlet_char_log(dirichlet_char_t x, const dirichlet_group_t G, ulong m)" -#ni arbcall"ulong dirichlet_char_exp(const dirichlet_group_t G, const dirichlet_char_t x)" -#ni arbcall"ulong _dirichlet_char_exp(dirichlet_char_t x, const dirichlet_group_t G)" -#ni arbcall"void dirichlet_char_one(dirichlet_char_t x, const dirichlet_group_t G)" -#ni arbcall"void dirichlet_char_first_primitive(dirichlet_char_t x, const dirichlet_group_t G)" -#ni arbcall"void dirichlet_char_set(dirichlet_char_t x, const dirichlet_group_t G, const dirichlet_char_t y)" -#ni arbcall"int dirichlet_char_next(dirichlet_char_t x, const dirichlet_group_t G)" -#ni arbcall"int dirichlet_char_next_primitive(dirichlet_char_t x, const dirichlet_group_t G)" -#ni arbcall"ulong dirichlet_index_char(const dirichlet_group_t G, const dirichlet_char_t x)" -#ni arbcall"void dirichlet_char_index(dirichlet_char_t x, const dirichlet_group_t G, ulong j)" -#ni arbcall"int dirichlet_char_eq(const dirichlet_char_t x, const dirichlet_char_t y)" -#ni arbcall"int dirichlet_char_eq_deep(const dirichlet_group_t G, const dirichlet_char_t x, const dirichlet_char_t y)" - -### Character properties -#ni arbcall"int dirichlet_char_is_principal(const dirichlet_group_t G, const dirichlet_char_t chi)" -#ni arbcall"ulong dirichlet_conductor_ui(const dirichlet_group_t G, ulong a)" -#ni arbcall"ulong dirichlet_conductor_char(const dirichlet_group_t G, const dirichlet_char_t x)" -#ni arbcall"int dirichlet_parity_ui(const dirichlet_group_t G, ulong a)" -#ni arbcall"int dirichlet_parity_char(const dirichlet_group_t G, const dirichlet_char_t x)" -#ni arbcall"ulong dirichlet_order_ui(const dirichlet_group_t G, ulong a)" -#ni arbcall"ulong dirichlet_order_char(const dirichlet_group_t G, const dirichlet_char_t x)" -#ni arbcall"int dirichlet_char_is_real(const dirichlet_group_t G, const dirichlet_char_t chi)" -#ni arbcall"int dirichlet_char_is_primitive(const dirichlet_group_t G, const dirichlet_char_t chi)" - -### Character evaluation -#ni arbcall"ulong dirichlet_pairing(const dirichlet_group_t G, ulong m, ulong n)" -#ni arbcall"ulong dirichlet_pairing_char(const dirichlet_group_t G, const dirichlet_char_t chi, const dirichlet_char_t psi)" -#ni arbcall"ulong dirichlet_chi(const dirichlet_group_t G, const dirichlet_char_t chi, ulong n)" -#ni arbcall"void dirichlet_chi_vec(ulong * v, const dirichlet_group_t G, const dirichlet_char_t chi, slong nv)" -#ni arbcall"void dirichlet_chi_vec_order(ulong * v, const dirichlet_group_t G, const dirichlet_char_t chi, ulong order, slong nv)" - -### Character operations -#ni arbcall"void dirichlet_char_mul(dirichlet_char_t chi12, const dirichlet_group_t G, const dirichlet_char_t chi1, const dirichlet_char_t chi2)" -#ni arbcall"void dirichlet_char_pow(dirichlet_char_t c, const dirichlet_group_t G, const dirichlet_char_t a, ulong n)" -#ni arbcall"void dirichlet_char_lift(dirichlet_char_t chi_G, const dirichlet_group_t G, const dirichlet_char_t chi_H, const dirichlet_group_t H)" -#ni arbcall"void dirichlet_char_lower(dirichlet_char_t chi_H, const dirichlet_group_t H, const dirichlet_char_t chi_G, const dirichlet_group_t G)" diff --git a/src/arbcalls/dlog.jl b/src/arbcalls/dlog.jl deleted file mode 100644 index d844e0c6..00000000 --- a/src/arbcalls/dlog.jl +++ /dev/null @@ -1,49 +0,0 @@ -### -### **dlog.h** -- discrete logarithms mod ulong primes -### - -### Types, macros and constants - -### Single evaluation -#ni arbcall"ulong dlog_once(ulong b, ulong a, const nmod_t mod, ulong n)" - -### Precomputations -#ni arbcall"void dlog_precomp_n_init(dlog_precomp_t pre, ulong a, ulong mod, ulong n, ulong num)" -#ni arbcall"ulong dlog_precomp(const dlog_precomp_t pre, ulong b)" -#ni arbcall"void dlog_precomp_clear(dlog_precomp_t pre)" -#ni arbcall"void dlog_precomp_modpe_init(dlog_precomp_t pre, ulong a, ulong p, ulong e, ulong pe, ulong num)" -#ni arbcall"void dlog_precomp_p_init(dlog_precomp_t pre, ulong a, ulong mod, ulong p, ulong num)" -#ni arbcall"void dlog_precomp_pe_init(dlog_precomp_t pre, ulong a, ulong mod, ulong p, ulong e, ulong pe, ulong num)" -#ni arbcall"void dlog_precomp_small_init(dlog_precomp_t pre, ulong a, ulong mod, ulong n, ulong num)" - -### Vector evaluations -arbcall"void dlog_vec_fill(ulong * v, ulong nv, ulong x)" -#ni arbcall"void dlog_vec_set_not_found(ulong * v, ulong nv, nmod_t mod)" -#ni arbcall"void dlog_vec(ulong * v, ulong nv, ulong a, ulong va, nmod_t mod, ulong na, nmod_t order)" -#ni arbcall"void dlog_vec_add(ulong * v, ulong nv, ulong a, ulong va, nmod_t mod, ulong na, nmod_t order)" -#ni arbcall"void dlog_vec_loop(ulong * v, ulong nv, ulong a, ulong va, nmod_t mod, ulong na, nmod_t order)" -#ni arbcall"void dlog_vec_loop_add(ulong * v, ulong nv, ulong a, ulong va, nmod_t mod, ulong na, nmod_t order)" -#ni arbcall"void dlog_vec_eratos(ulong * v, ulong nv, ulong a, ulong va, nmod_t mod, ulong na, nmod_t order)" -#ni arbcall"void dlog_vec_eratos_add(ulong * v, ulong nv, ulong a, ulong va, nmod_t mod, ulong na, nmod_t order)" -#ni arbcall"void dlog_vec_sieve_add(ulong * v, ulong nv, ulong a, ulong va, nmod_t mod, ulong na, nmod_t order)" -#ni arbcall"void dlog_vec_sieve(ulong * v, ulong nv, ulong a, ulong va, nmod_t mod, ulong na, nmod_t order)" - -### Internal discrete logarithm strategies -#ni arbcall"ulong dlog_table_init(dlog_table_t t, ulong a, ulong mod)" -#ni arbcall"void dlog_table_clear(dlog_table_t t)" -#ni arbcall"ulong dlog_table(dlog_table_t t, ulong b)" -#ni arbcall"ulong dlog_bsgs_init(dlog_bsgs_t t, ulong a, ulong mod, ulong n, ulong m)" -#ni arbcall"void dlog_bsgs_clear(dlog_bsgs_t t)" -#ni arbcall"ulong dlog_bsgs(dlog_bsgs_t t, ulong b)" -#ni arbcall"ulong dlog_modpe_init(dlog_modpe_t t, ulong a, ulong p, ulong e, ulong pe, ulong num)" -#ni arbcall"void dlog_modpe_clear(dlog_modpe_t t)" -#ni arbcall"ulong dlog_modpe(dlog_modpe_t t, ulong b)" -#ni arbcall"ulong dlog_crt_init(dlog_crt_t t, ulong a, ulong mod, ulong n, ulong num)" -#ni arbcall"void dlog_crt_clear(dlog_crt_t t)" -#ni arbcall"ulong dlog_crt(dlog_crt_t t, ulong b)" -#ni arbcall"ulong dlog_power_init(dlog_power_t t, ulong a, ulong mod, ulong p, ulong e, ulong num)" -#ni arbcall"void dlog_power_clear(dlog_power_t t)" -#ni arbcall"ulong dlog_power(dlog_power_t t, ulong b)" -#ni arbcall"ulong dlog_rho_init(dlog_rho_t t, ulong a, ulong mod, ulong n, ulong num)" -#ni arbcall"void dlog_rho_clear(dlog_rho_t t)" -#ni arbcall"ulong dlog_rho(dlog_rho_t t, ulong b)" diff --git a/src/arbcalls/double_interval.jl b/src/arbcalls/double_interval.jl deleted file mode 100644 index 7fc5943a..00000000 --- a/src/arbcalls/double_interval.jl +++ /dev/null @@ -1,30 +0,0 @@ -### -### **double_interval.h** -- double-precision interval arithmetic and helpers -### - -### Types, macros and constants - -### Basic manipulation -#ni arbcall"di_t di_interval(double a, double b)" -#ni arbcall"di_t arb_get_di(const arb_t x)" -#ni arbcall"void arb_set_di(arb_t res, di_t x, slong prec)" -#ni arbcall"void di_print(di_t x)" -#ns arbcall"double d_randtest2(flint_rand_t state)" -#ns arbcall"di_t di_randtest(flint_rand_t state)" - -### Arithmetic -#ni arbcall"di_t di_neg(di_t x)" - -### Fast arithmetic -#ni arbcall"di_t di_fast_add(di_t x, di_t y)" -#ni arbcall"di_t di_fast_sub(di_t x, di_t y)" -#ni arbcall"di_t di_fast_mul(di_t x, di_t y)" -#ni arbcall"di_t di_fast_div(di_t x, di_t y)" -#ni arbcall"di_t di_fast_sqr(di_t x)" -#ni arbcall"di_t di_fast_add_d(di_t x, double y)" -#ni arbcall"di_t di_fast_sub_d(di_t x, double y)" -#ni arbcall"di_t di_fast_mul_d(di_t x, double y)" -#ni arbcall"di_t di_fast_div_d(di_t x, double y)" -#ni arbcall"di_t di_fast_log_nonnegative(di_t x)" -#ni arbcall"di_t di_fast_mid(di_t x)" -#ni arbcall"double di_fast_ubound_radius(di_t x)" diff --git a/src/arbcalls/fmpz_extras.jl b/src/arbcalls/fmpz_extras.jl index 6e651727..ffd314a4 100644 --- a/src/arbcalls/fmpz_extras.jl +++ b/src/arbcalls/fmpz_extras.jl @@ -6,11 +6,8 @@ #ni arbcall"slong fmpz_allocated_bytes(const fmpz_t x)" ### Convenience methods -#ni arbcall"void fmpz_add_si(fmpz_t z, const fmpz_t x, slong y)" -#ni arbcall"void fmpz_sub_si(fmpz_t z, const fmpz_t x, slong y)" #ni arbcall"void fmpz_adiv_q_2exp(fmpz_t z, const fmpz_t x, flint_bitcnt_t exp)" #ni arbcall"void fmpz_ui_mul_ui(fmpz_t x, ulong a, ulong b)" -#ni arbcall"void fmpz_ui_pow_ui(fmpz_t x, ulong b, ulong e)" #ni arbcall"void fmpz_max(fmpz_t z, const fmpz_t x, const fmpz_t y)" #ni arbcall"void fmpz_min(fmpz_t z, const fmpz_t x, const fmpz_t y)" diff --git a/src/arbcalls/fmpzi.jl b/src/arbcalls/fmpzi.jl deleted file mode 100644 index 268d5347..00000000 --- a/src/arbcalls/fmpzi.jl +++ /dev/null @@ -1,26 +0,0 @@ -### -### **fmpzi.h** -- Gaussian integers -### - -### Types, macros and constants - -### Basic manipulation -#ni arbcall"void fmpzi_init(fmpzi_t x)" -#ni arbcall"void fmpzi_clear(fmpzi_t x)" -#ni arbcall"int fmpzi_equal(const fmpzi_t x, const fmpzi_t y)" -#ni arbcall"void fmpzi_zero(fmpzi_t x)" -#ni arbcall"void fmpzi_one(fmpzi_t x)" -#ni arbcall"void fmpzi_set(fmpzi_t res, const fmpzi_t x)" -#ni arbcall"void fmpzi_set_si_si(fmpzi_t res, slong a, slong b)" -#ni arbcall"void fmpzi_swap(fmpzi_t x, fmpzi_t y)" -#ni arbcall"void fmpzi_print(const fmpzi_t x)" -#ni arbcall"void fmpzi_randtest(fmpzi_t res, flint_rand_t state, mp_bitcnt_t bits)" - -### Arithmetic -#ni arbcall"void fmpzi_conj(fmpzi_t res, const fmpzi_t x)" -#ni arbcall"void fmpzi_neg(fmpzi_t res, const fmpzi_t x)" -#ni arbcall"void fmpzi_add(fmpzi_t res, const fmpzi_t x, const fmpzi_t y)" -#ni arbcall"void fmpzi_sub(fmpzi_t res, const fmpzi_t x, const fmpzi_t y)" -#ni arbcall"void fmpzi_sqr(fmpzi_t res, const fmpzi_t x)" -#ni arbcall"void fmpzi_mul(fmpzi_t res, const fmpzi_t x, const fmpzi_t y)" -#ni arbcall"void fmpzi_pow_ui(fmpzi_t res, const fmpzi_t x, ulong exp)" diff --git a/src/arbcalls/mag.jl b/src/arbcalls/mag.jl index 0e74ae32..3aaeee9d 100644 --- a/src/arbcalls/mag.jl +++ b/src/arbcalls/mag.jl @@ -25,7 +25,6 @@ arbcall"int mag_is_finite(const mag_t x)" arbcall"void mag_init_set(mag_t res, const mag_t x)" arbcall"void mag_set(mag_t res, const mag_t x)" arbcall"void mag_set_d(mag_t res, double x)" -#ns arbcall"void mag_set_fmpr(mag_t res, const fmpr_t x)" arbcall"void mag_set_ui(mag_t res, ulong x)" #ni arbcall"void mag_set_fmpz(mag_t res, const fmpz_t x)" arbcall"void mag_set_d_lower(mag_t res, double x)" @@ -38,7 +37,6 @@ arbcall"void mag_set_ui_2exp_si(mag_t res, ulong x, slong y)" #ni arbcall"void mag_set_fmpz_2exp_fmpz_lower(mag_t res, const fmpz_t x, const fmpz_t y)" arbcall"double mag_get_d(const mag_t x)" arbcall"double mag_get_d_log2_approx(const mag_t x)" -#ns arbcall"void mag_get_fmpr(fmpr_t res, const mag_t x)" #ni arbcall"void mag_get_fmpq(fmpq_t res, const mag_t x)" #ni arbcall"void mag_get_fmpz(fmpz_t res, const mag_t x)" #ni arbcall"void mag_get_fmpz_lower(fmpz_t res, const mag_t x)" From 97f1fbb080aa1905252277394a031d2f1e4d4f5b Mon Sep 17 00:00:00 2001 From: Joel Dahne Date: Mon, 24 Jul 2023 09:32:02 +0200 Subject: [PATCH 06/12] README: Mention that Arb is part of Flint --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a6009bfa..765b7d13 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,9 @@ [![][docs-stable-img]][docs-stable-url] [![][docs-dev-img]][docs-dev-url] -This package is a thin, efficient wrapper around [Arb](http://arblib.org) - a C library for arbitrary-precision ball arithmetic. +This package is a thin, efficient wrapper around +[Arb](http://arblib.org) - a C library for arbitrary-precision ball +arithmetic. Since 2023 Arb is part of [Flint](https://flintlib.org/). The package is currently in early development. More features and documentation will be added. While we try to avoid it there might be From b1b1e07e002af1ec27967166ed9af2f0efd1899a Mon Sep 17 00:00:00 2001 From: Joel Dahne Date: Mon, 23 Oct 2023 19:35:09 +0200 Subject: [PATCH 07/12] Parse Flint 3 documentation on tag v3.0.0 This is commit 6fb6a8d95e7a2403746e7e260b2375c78160e264 --- src/arbcalls/acb_dirichlet.jl | 15 +++++++-------- src/arbcalls/acb_hypgeom.jl | 2 +- src/arbcalls/acb_mat.jl | 2 +- src/arbcalls/acb_poly.jl | 2 +- src/arbcalls/arb.jl | 3 ++- src/arbcalls/arb_hypgeom.jl | 6 +++--- src/arbcalls/arb_poly.jl | 4 ++-- src/arbcalls/bernoulli.jl | 2 +- src/arbcalls/fmpz_extras.jl | 2 +- src/arbcalls/hypgeom.jl | 2 +- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/arbcalls/acb_dirichlet.jl b/src/arbcalls/acb_dirichlet.jl index 78813a62..47093b95 100644 --- a/src/arbcalls/acb_dirichlet.jl +++ b/src/arbcalls/acb_dirichlet.jl @@ -26,17 +26,17 @@ arbcall"void acb_dirichlet_zeta_rs_d_coeffs(arb_ptr d, const arb_t sigma, slong arbcall"void acb_dirichlet_zeta_rs_bound(mag_t err, const acb_t s, slong K)" arbcall"void acb_dirichlet_zeta_rs_r(acb_t res, const acb_t s, slong K, slong prec)" arbcall"void acb_dirichlet_zeta_rs(acb_t res, const acb_t s, slong K, slong prec)" -arbcall"void acb_dirichlet_zeta_jet_rs(acb_t res, const acb_t s, slong len, slong prec)" +arbcall"void acb_dirichlet_zeta_jet_rs(acb_ptr res, const acb_t s, slong len, slong prec)" ### Hurwitz zeta function arbcall"void acb_dirichlet_hurwitz(acb_t res, const acb_t s, const acb_t a, slong prec)" ### Hurwitz zeta function precomputation -#ni arbcall"void acb_dirichlet_hurwitz_precomp_init(acb_dirichlet_hurwitz_precomp_t pre, const acb_t s, int deflate, ulong A, ulong K, ulong N, slong prec)" +#ni arbcall"void acb_dirichlet_hurwitz_precomp_init(acb_dirichlet_hurwitz_precomp_t pre, const acb_t s, int deflate, slong A, slong K, slong N, slong prec)" #ni arbcall"void acb_dirichlet_hurwitz_precomp_init_num(acb_dirichlet_hurwitz_precomp_t pre, const acb_t s, int deflate, double num_eval, slong prec)" #ni arbcall"void acb_dirichlet_hurwitz_precomp_clear(acb_dirichlet_hurwitz_precomp_t pre)" arbcall"void acb_dirichlet_hurwitz_precomp_choose_param(ulong * A, ulong * K, ulong * N, const acb_t s, double num_eval, slong prec)" -arbcall"void acb_dirichlet_hurwitz_precomp_bound(mag_t res, const acb_t s, ulong A, ulong K, ulong N)" +arbcall"void acb_dirichlet_hurwitz_precomp_bound(mag_t res, const acb_t s, slong A, slong K, slong N)" #ni arbcall"void acb_dirichlet_hurwitz_precomp_eval(acb_t res, const acb_dirichlet_hurwitz_precomp_t pre, ulong p, ulong q, slong prec)" ### Lerch transcendent @@ -56,10 +56,9 @@ arbcall"void acb_dirichlet_lerch_phi(acb_t res, const acb_t z, const acb_t s, co ### Dirichlet character Gauss, Jacobi and theta sums #ni arbcall"void acb_dirichlet_gauss_sum_naive(acb_t res, const dirichlet_group_t G, const dirichlet_char_t chi, slong prec)" #ni arbcall"void acb_dirichlet_gauss_sum_factor(acb_t res, const dirichlet_group_t G, const dirichlet_char_t chi, slong prec)" -#ni arbcall"void acb_dirichlet_gauss_sum_order2(acb_t res, const dirichlet_char_t chi, slong prec)" +#ni arbcall"void acb_dirichlet_gauss_sum_order2(acb_t res, const dirichlet_group_t G, const dirichlet_char_t chi, slong prec)" #ni arbcall"void acb_dirichlet_gauss_sum_theta(acb_t res, const dirichlet_group_t G, const dirichlet_char_t chi, slong prec)" #ni arbcall"void acb_dirichlet_gauss_sum(acb_t res, const dirichlet_group_t G, const dirichlet_char_t chi, slong prec)" -#ni arbcall"void acb_dirichlet_gauss_sum_ui(acb_t res, const dirichlet_group_t G, ulong a, slong prec)" #ni arbcall"void acb_dirichlet_jacobi_sum_naive(acb_t res, const dirichlet_group_t G, const dirichlet_char_t chi1, const dirichlet_char_t chi2, slong prec)" #ni arbcall"void acb_dirichlet_jacobi_sum_factor(acb_t res, const dirichlet_group_t G, const dirichlet_char_t chi1, const dirichlet_char_t chi2, slong prec)" #ni arbcall"void acb_dirichlet_jacobi_sum_gauss(acb_t res, const dirichlet_group_t G, const dirichlet_char_t chi1, const dirichlet_char_t chi2, slong prec)" @@ -68,8 +67,8 @@ arbcall"void acb_dirichlet_lerch_phi(acb_t res, const acb_t z, const acb_t s, co #ni arbcall"void acb_dirichlet_chi_theta_arb(acb_t res, const dirichlet_group_t G, const dirichlet_char_t chi, const arb_t t, slong prec)" #ni arbcall"void acb_dirichlet_ui_theta_arb(acb_t res, const dirichlet_group_t G, ulong a, const arb_t t, slong prec)" arbcall"ulong acb_dirichlet_theta_length(ulong q, const arb_t t, slong prec)" -#ni arbcall"void acb_dirichlet_qseries_powers_naive(acb_t res, const arb_t x, int p, const ulong * a, const acb_dirichlet_powers_t z, slong len, slong prec)" -#ni arbcall"void acb_dirichlet_qseries_powers_smallorder(acb_t res, const arb_t x, int p, const ulong * a, const acb_dirichlet_powers_t z, slong len, slong prec)" +#ni arbcall"void acb_dirichlet_qseries_arb_powers_naive(acb_t res, const arb_t x, int p, const ulong * a, const acb_dirichlet_roots_t z, slong len, slong prec)" +#ni arbcall"void acb_dirichlet_qseries_arb_powers_smallorder(acb_t res, const arb_t x, int p, const ulong * a, const acb_dirichlet_roots_t z, slong len, slong prec)" ### Discrete Fourier transforms #ni arbcall"void acb_dirichlet_dft_conrey(acb_ptr w, acb_srcptr v, const dirichlet_group_t G, slong prec)" @@ -91,7 +90,7 @@ arbcall"ulong acb_dirichlet_theta_length(ulong q, const arb_t t, slong prec)" ### Hardy Z-functions #ni arbcall"void acb_dirichlet_hardy_theta(acb_ptr res, const acb_t t, const dirichlet_group_t G, const dirichlet_char_t chi, slong len, slong prec)" -#ni arbcall"void acb_dirichlet_hardy_z(acb_t res, const acb_t t, const dirichlet_group_t G, const dirichlet_char_t chi, slong len, slong prec)" +#ni arbcall"void acb_dirichlet_hardy_z(acb_ptr res, const acb_t t, const dirichlet_group_t G, const dirichlet_char_t chi, slong len, slong prec)" #ni arbcall"void _acb_dirichlet_hardy_theta_series(acb_ptr res, acb_srcptr t, slong tlen, const dirichlet_group_t G, const dirichlet_char_t chi, slong len, slong prec)" #ni arbcall"void acb_dirichlet_hardy_theta_series(acb_poly_t res, const acb_poly_t t, const dirichlet_group_t G, const dirichlet_char_t chi, slong len, slong prec)" #ni arbcall"void _acb_dirichlet_hardy_z_series(acb_ptr res, acb_srcptr t, slong tlen, const dirichlet_group_t G, const dirichlet_char_t chi, slong len, slong prec)" diff --git a/src/arbcalls/acb_hypgeom.jl b/src/arbcalls/acb_hypgeom.jl index f17e25ff..af440c4c 100644 --- a/src/arbcalls/acb_hypgeom.jl +++ b/src/arbcalls/acb_hypgeom.jl @@ -47,7 +47,7 @@ arbcall"void acb_hypgeom_u_asymp(acb_t res, const acb_t a, const acb_t b, const arbcall"int acb_hypgeom_u_use_asymp(const acb_t z, slong prec)" ### Generalized hypergeometric function -arbcall"void acb_hypgeom_pfq(acb_poly_t res, acb_srcptr a, slong p, acb_srcptr b, slong q, const acb_t z, int regularized, slong prec)" +arbcall"void acb_hypgeom_pfq(acb_t res, acb_srcptr a, slong p, acb_srcptr b, slong q, const acb_t z, int regularized, slong prec)" ### Confluent hypergeometric functions arbcall"void acb_hypgeom_u_1f1_series(acb_poly_t res, const acb_poly_t a, const acb_poly_t b, const acb_poly_t z, slong len, slong prec)" diff --git a/src/arbcalls/acb_mat.jl b/src/arbcalls/acb_mat.jl index aa7220ed..f4b11868 100644 --- a/src/arbcalls/acb_mat.jl +++ b/src/arbcalls/acb_mat.jl @@ -59,7 +59,7 @@ arbcall"void acb_mat_conjugate(acb_mat_t dest, const acb_mat_t src)" ### Norms arbcall"void acb_mat_bound_inf_norm(mag_t b, const acb_mat_t A)" -arbcall"void acb_mat_frobenius_norm(acb_t res, const acb_mat_t A, slong prec)" +arbcall"void acb_mat_frobenius_norm(arb_t res, const acb_mat_t A, slong prec)" arbcall"void acb_mat_bound_frobenius_norm(mag_t res, const acb_mat_t A)" ### Arithmetic diff --git a/src/arbcalls/acb_poly.jl b/src/arbcalls/acb_poly.jl index 1bc1c87a..7abf37c6 100644 --- a/src/arbcalls/acb_poly.jl +++ b/src/arbcalls/acb_poly.jl @@ -172,7 +172,7 @@ arbcall"void acb_poly_binomial_transform_convolution(acb_poly_t b, const acb_pol arbcall"void _acb_poly_binomial_transform(acb_ptr b, acb_srcptr a, slong alen, slong len, slong prec)" arbcall"void acb_poly_binomial_transform(acb_poly_t b, const acb_poly_t a, slong len, slong prec)" arbcall"void _acb_poly_graeffe_transform(acb_ptr b, acb_srcptr a, slong len, slong prec)" -arbcall"void acb_poly_graeffe_transform(acb_poly_t b, acb_poly_t a, slong prec)" +arbcall"void acb_poly_graeffe_transform(acb_poly_t b, const acb_poly_t a, slong prec)" ### Elementary functions arbcall"void _acb_poly_pow_ui_trunc_binexp(acb_ptr res, acb_srcptr f, slong flen, ulong exp, slong len, slong prec)" diff --git a/src/arbcalls/arb.jl b/src/arbcalls/arb.jl index a08c4277..86a3af85 100644 --- a/src/arbcalls/arb.jl +++ b/src/arbcalls/arb.jl @@ -143,6 +143,7 @@ arbcall"void arb_sgn(arb_t y, const arb_t x)" arbcall"int arb_sgn_nonzero(const arb_t x)" arbcall"void arb_min(arb_t z, const arb_t x, const arb_t y, slong prec)" arbcall"void arb_max(arb_t z, const arb_t x, const arb_t y, slong prec)" +arbcall"void arb_minmax(arb_t z1, arb_t z2, const arb_t x, const arb_t y, slong prec)" arbcall"void arb_add(arb_t z, const arb_t x, const arb_t y, slong prec)" arbcall"void arb_add_arf(arb_t z, const arb_t x, const arf_t y, slong prec)" arbcall"void arb_add_ui(arb_t z, const arb_t x, ulong y, slong prec)" @@ -398,7 +399,7 @@ arbcall"void _arb_vec_scalar_div(arb_ptr res, arb_srcptr vec, slong len, const a #ni arbcall"void _arb_vec_scalar_mul_fmpz(arb_ptr res, arb_srcptr vec, slong len, const fmpz_t c, slong prec)" arbcall"void _arb_vec_scalar_mul_2exp_si(arb_ptr res, arb_srcptr src, slong len, slong c)" arbcall"void _arb_vec_scalar_addmul(arb_ptr res, arb_srcptr vec, slong len, const arb_t c, slong prec)" -arbcall"void _arb_vec_get_mag(mag_t bound, arb_srcptr vec, slong len, slong prec)" +arbcall"void _arb_vec_get_mag(mag_t bound, arb_srcptr vec, slong len)" arbcall"slong _arb_vec_bits(arb_srcptr x, slong len)" arbcall"void _arb_vec_set_powers(arb_ptr xs, const arb_t x, slong len, slong prec)" #ni arbcall"void _arb_vec_add_error_arf_vec(arb_ptr res, arf_srcptr err, slong len)" diff --git a/src/arbcalls/arb_hypgeom.jl b/src/arbcalls/arb_hypgeom.jl index 6976f6ef..385e393d 100644 --- a/src/arbcalls/arb_hypgeom.jl +++ b/src/arbcalls/arb_hypgeom.jl @@ -41,11 +41,11 @@ arbcall"void arb_hypgeom_m(arb_t res, const arb_t a, const arb_t b, const arb_t arbcall"void arb_hypgeom_1f1(arb_t res, const arb_t a, const arb_t b, const arb_t z, int regularized, slong prec)" arbcall"void arb_hypgeom_1f1_integration(arb_t res, const arb_t a, const arb_t b, const arb_t z, int regularized, slong prec)" arbcall"void arb_hypgeom_u(arb_t res, const arb_t a, const arb_t b, const arb_t z, slong prec)" -arbcall"void arb_hypgeom_u_integration(arb_t res, const arb_t a, const arb_t b, const arb_t z, int regularized, slong prec)" +arbcall"void arb_hypgeom_u_integration(arb_t res, const arb_t a, const arb_t b, const arb_t z, slong prec)" ### Gauss hypergeometric function arbcall"void arb_hypgeom_2f1(arb_t res, const arb_t a, const arb_t b, const arb_t c, const arb_t z, int regularized, slong prec)" -arbcall"void arb_hypgeom_2f1_integration(arb_t res, const arb_t a, const arb_t b, const arb_t z, int regularized, slong prec)" +arbcall"void arb_hypgeom_2f1_integration(arb_t res, const arb_t a, const arb_t b, const arb_t c, const arb_t z, int regularized, slong prec)" ### Error functions and Fresnel integrals arbcall"void arb_hypgeom_erf(arb_t res, const arb_t z, slong prec)" @@ -146,7 +146,7 @@ arbcall"void arb_hypgeom_legendre_p_ui_deriv_bound(mag_t dp, mag_t dp2, ulong n, arbcall"void arb_hypgeom_legendre_p_ui_zero(arb_t res, arb_t res_prime, ulong n, const arb_t x, slong K, slong prec)" arbcall"void arb_hypgeom_legendre_p_ui_one(arb_t res, arb_t res_prime, ulong n, const arb_t x, slong K, slong prec)" arbcall"void arb_hypgeom_legendre_p_ui_asymp(arb_t res, arb_t res_prime, ulong n, const arb_t x, slong K, slong prec)" -arbcall"void arb_hypgeom_legendre_p_rec(arb_t res, arb_t res_prime, ulong n, const arb_t x, slong prec)" +arbcall"void arb_hypgeom_legendre_p_ui_rec(arb_t res, arb_t res_prime, ulong n, const arb_t x, slong prec)" arbcall"void arb_hypgeom_legendre_p_ui(arb_t res, arb_t res_prime, ulong n, const arb_t x, slong prec)" arbcall"void arb_hypgeom_legendre_p_ui_root(arb_t res, arb_t weight, ulong n, ulong k, slong prec)" diff --git a/src/arbcalls/arb_poly.jl b/src/arbcalls/arb_poly.jl index f483dc91..0a2f12ce 100644 --- a/src/arbcalls/arb_poly.jl +++ b/src/arbcalls/arb_poly.jl @@ -162,7 +162,7 @@ arbcall"void arb_poly_interpolate_fast(arb_poly_t poly, arb_srcptr xs, arb_srcpt arbcall"void _arb_poly_derivative(arb_ptr res, arb_srcptr poly, slong len, slong prec)" arbcall"void arb_poly_derivative(arb_poly_t res, const arb_poly_t poly, slong prec)" arbcall"void _arb_poly_nth_derivative(arb_ptr res, arb_srcptr poly, ulong n, slong len, slong prec)" -arbcall"void arb_poly_nth_derivative(arb_poly_t res, const arb_poly_t poly, slong prec)" +arbcall"void arb_poly_nth_derivative(arb_poly_t res, const arb_poly_t poly, ulong n, slong prec)" arbcall"void _arb_poly_integral(arb_ptr res, arb_srcptr poly, slong len, slong prec)" arbcall"void arb_poly_integral(arb_poly_t res, const arb_poly_t poly, slong prec)" @@ -178,7 +178,7 @@ arbcall"void arb_poly_binomial_transform_convolution(arb_poly_t b, const arb_pol arbcall"void _arb_poly_binomial_transform(arb_ptr b, arb_srcptr a, slong alen, slong len, slong prec)" arbcall"void arb_poly_binomial_transform(arb_poly_t b, const arb_poly_t a, slong len, slong prec)" arbcall"void _arb_poly_graeffe_transform(arb_ptr b, arb_srcptr a, slong len, slong prec)" -arbcall"void arb_poly_graeffe_transform(arb_poly_t b, arb_poly_t a, slong prec)" +arbcall"void arb_poly_graeffe_transform(arb_poly_t b, const arb_poly_t a, slong prec)" ### Powers and elementary functions arbcall"void _arb_poly_pow_ui_trunc_binexp(arb_ptr res, arb_srcptr f, slong flen, ulong exp, slong len, slong prec)" diff --git a/src/arbcalls/bernoulli.jl b/src/arbcalls/bernoulli.jl index 5f3f3a5a..bf63dd0a 100644 --- a/src/arbcalls/bernoulli.jl +++ b/src/arbcalls/bernoulli.jl @@ -6,7 +6,7 @@ #ni arbcall"void bernoulli_rev_init(bernoulli_rev_t iter, ulong n)" #ni arbcall"void bernoulli_rev_next(fmpz_t numer, fmpz_t denom, bernoulli_rev_t iter)" #ni arbcall"void bernoulli_rev_clear(bernoulli_rev_t iter)" -#ni arbcall"void bernoulli_fmpq_vec_no_cache(fmpq_t * res, ulong a, slong num)" +#ni arbcall"void bernoulli_fmpq_vec_no_cache(fmpq * res, ulong a, slong num)" ### Caching arbcall"void bernoulli_cache_compute(slong n)" diff --git a/src/arbcalls/fmpz_extras.jl b/src/arbcalls/fmpz_extras.jl index ffd314a4..f6914cc4 100644 --- a/src/arbcalls/fmpz_extras.jl +++ b/src/arbcalls/fmpz_extras.jl @@ -19,7 +19,7 @@ #ni arbcall"void fmpz_add2_fmpz_si_inline(fmpz_t z, const fmpz_t x, const fmpz_t y, slong c)" #ni arbcall"mp_size_t _fmpz_size(const fmpz_t x)" #ni arbcall"slong _fmpz_sub_small(const fmpz_t x, const fmpz_t y)" -#ni arbcall"slong _fmpz_set_si_small(fmpz_t x, slong v)" +#ni arbcall"void _fmpz_set_si_small(fmpz_t x, slong v)" ### Low-level conversions #ni arbcall"void fmpz_set_mpn_large(fmpz_t z, mp_srcptr src, mp_size_t n, int negative)" diff --git a/src/arbcalls/hypgeom.jl b/src/arbcalls/hypgeom.jl index c60d0be5..b0b12a92 100644 --- a/src/arbcalls/hypgeom.jl +++ b/src/arbcalls/hypgeom.jl @@ -16,5 +16,5 @@ arbcall"slong hypgeom_bound(mag_t error, int r, slong C, slong D, slong K, const #ni arbcall"void hypgeom_precompute(hypgeom_t hyp)" ### Summation -#ni arbcall"void arb_hypgeom_sum(arb_t P, arb_t Q, const hypgeom_t hyp, const slong n, slong prec)" +#ni arbcall"void arb_hypgeom_sum(arb_t P, arb_t Q, const hypgeom_t hyp, slong n, slong prec)" #ni arbcall"void arb_hypgeom_infsum(arb_t P, arb_t Q, hypgeom_t hyp, slong tol, slong prec)" From d6f4519cd57f195bfeb4d3a659b036b02614eb84 Mon Sep 17 00:00:00 2001 From: Joel Dahne Date: Mon, 23 Oct 2023 19:35:10 +0200 Subject: [PATCH 08/12] Use minmax! for defining minmax --- src/minmax.jl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/minmax.jl b/src/minmax.jl index aec6e5eb..b4a3dc70 100644 --- a/src/minmax.jl +++ b/src/minmax.jl @@ -7,7 +7,14 @@ for T in (ArfOrRef, ArbOrRef) Arblib.min!($(_nonreftype(T))(prec = _precision(x, y)), x, y) @eval Base.max(x::$T, y::$T) = Arblib.max!($(_nonreftype(T))(prec = _precision(x, y)), x, y) - @eval Base.minmax(x::$T, y::$T) = (min(x, y), max(x, y)) +end + +Base.minmax(x::ArfOrRef, y::ArfOrRef) = (min(x, y), max(x, y)) +function Base.minmax(x::ArbOrRef, y::ArbOrRef) + z1 = Arb(prec = _precision(x, y)) + z2 = Arb(prec = _precision(x, y)) + minmax!(z1, z2, x, y) + return z1, z2 end ### minimum and maximum From c9d2f71e414da1a921b7f1cdad18feb35fb77e76 Mon Sep 17 00:00:00 2001 From: Joel Dahne Date: Mon, 23 Oct 2023 19:35:10 +0200 Subject: [PATCH 09/12] Use new nth_derivative! method --- src/poly.jl | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/src/poly.jl b/src/poly.jl index a2598782..50912196 100644 --- a/src/poly.jl +++ b/src/poly.jl @@ -547,32 +547,17 @@ derivative(p::Poly) = derivative!(zero(p), p) derivative(p::T) where {T<:Series} = derivative!(T(degree = degree(p) - 1, prec = precision(p)), p) -function derivative(p::Poly, n::Integer) - n == 0 && return copy(p) - n >= 0 || throw(ArgumentError("n must be non-negative")) - - res = derivative!(zero(p), p) - for _ = 2:n - derivative!(res, res) - end - return res -end +derivative(p::Poly, n::Integer) = nth_derivative!(zero(p), p, convert(UInt, n)) function derivative(p::T, n::Integer) where {T<:Series} - n == 0 && return copy(p) - n >= 0 || throw(ArgumentError("n must be non-negative")) n <= Arblib.degree(p) || throw(ArgumentError("n must be less than or equal to the degree of p")) - res = T(degree = degree(p) - n, prec = precision(p)) - # During the computations the actual degree of res will be higher - # than its given degree. But in the end it should have the correct - # degree. - derivative!(res, p) - for _ = 2:n - derivative!(res, res) - end - return res + return nth_derivative!( + T(degree = degree(p) - n, prec = precision(p)), + p, + convert(UInt, n), + ) end integral(p::Poly) = integral!(zero(p), p) From 3732ad014704b74aef27e053e9ce7b9ffb096049 Mon Sep 17 00:00:00 2001 From: Joel Dahne Date: Mon, 23 Oct 2023 19:35:10 +0200 Subject: [PATCH 10/12] Documentation: Mention that Arb is part of Flint --- docs/src/index.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/src/index.md b/docs/src/index.md index a496b4fd..27a56ae3 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -1,7 +1,8 @@ # Arblib.jl Documentation This package is a wrapper around [Arb](http://arblib.org) - a C -library for arbitrary-precision ball arithmetic. Other wrappers of Arb +library for arbitrary-precision ball arithmetic. Since 2023 Arb is +part of [Flint](https://flintlib.org/). Other wrappers of Arb/Flint for Julia include [Nemo](https://github.com/Nemocas/Nemo.jl) and [ArbNumerics.jl](https://github.com/JeffreySarnoff/ArbNumerics.jl). From 6ac164fb28aa2dd828772e16812f8f5aabfe8d8e Mon Sep 17 00:00:00 2001 From: Joel Dahne Date: Wed, 25 Oct 2023 11:18:19 +0200 Subject: [PATCH 11/12] Update compat for FLINT_jll --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 5055ec4f..6f80b37d 100644 --- a/Project.toml +++ b/Project.toml @@ -15,7 +15,7 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [compat] -FLINT_jll = "~200.900.000" +FLINT_jll = "~300.0.0" SpecialFunctions = "1.0, 2" julia = "1.6" From cc6998eaa57407274d148e9c3402199941a7ddef Mon Sep 17 00:00:00 2001 From: Joel Dahne Date: Fri, 27 Oct 2023 15:46:22 +0200 Subject: [PATCH 12/12] Remove libarb macro --- src/Arblib.jl | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Arblib.jl b/src/Arblib.jl index f504870b..61e3b3b0 100644 --- a/src/Arblib.jl +++ b/src/Arblib.jl @@ -31,11 +31,6 @@ macro libflint(function_name) return (:($function_name), libflint) end -# For backwards compatibility with when Arb was a separate package -macro libarb(function_name) - return (:($function_name), libflint) -end - const __isthreaded = Ref(false) function __init__()