Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed documentation to match headers. #1431

Merged
merged 2 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions doc/source/acb_dirichlet.rst
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ the evaluation.
otherwise chooses the number of terms automatically based on *s* and the
precision.

.. function:: void acb_dirichlet_zeta_jet_rs(acb_t res, const acb_t s, slong len, slong prec)
.. function:: void acb_dirichlet_zeta_jet_rs(acb_ptr res, const acb_t s, slong len, slong prec)

Computes the first *len* terms of the Taylor series of the Riemann zeta
function at *s* using the Riemann Siegel formula. This function currently
Expand All @@ -214,7 +214,7 @@ Hurwitz zeta function precomputation

.. type:: acb_dirichlet_hurwitz_precomp_t

.. function:: 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)
.. function:: 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)

Precomputes a grid of Taylor polynomials for fast evaluation of
`\zeta(s,a)` on `a \in (0,1]` with fixed *s*.
Expand Down Expand Up @@ -256,7 +256,7 @@ Hurwitz zeta function precomputation
scratch would be better than performing a precomputation, *A*, *K* and *N*
are all set to 0.

.. function:: void acb_dirichlet_hurwitz_precomp_bound(mag_t res, const acb_t s, ulong A, ulong K, ulong N)
.. function:: void acb_dirichlet_hurwitz_precomp_bound(mag_t res, const acb_t s, slong A, slong K, slong N)

Computes an upper bound for the truncation error (not accounting for
roundoff error) when evaluating `\zeta(s,a)` with precomputation parameters
Expand Down Expand Up @@ -348,13 +348,12 @@ Dirichlet character Gauss, Jacobi and theta sums

.. function:: void acb_dirichlet_gauss_sum_factor(acb_t res, const dirichlet_group_t G, const dirichlet_char_t chi, slong prec)

.. function:: void acb_dirichlet_gauss_sum_order2(acb_t res, const dirichlet_char_t chi, slong prec)
.. function:: void acb_dirichlet_gauss_sum_order2(acb_t res, const dirichlet_group_t G, const dirichlet_char_t chi, slong prec)

.. function:: void acb_dirichlet_gauss_sum_theta(acb_t res, const dirichlet_group_t G, const dirichlet_char_t chi, slong prec)

.. function:: void acb_dirichlet_gauss_sum(acb_t res, const dirichlet_group_t G, const dirichlet_char_t chi, slong prec)

.. function:: void acb_dirichlet_gauss_sum_ui(acb_t res, const dirichlet_group_t G, ulong a, slong prec)

Sets *res* to the Gauss sum

Expand Down Expand Up @@ -440,9 +439,9 @@ Dirichlet character Gauss, Jacobi and theta sums
Compute the number of terms to be summed in the theta series of argument *t*
so that the tail is less than `2^{-\mathrm{prec}}`.

.. function:: 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)
.. function:: 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)

.. function:: 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)
.. function:: 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)

Compute the series `\sum n^p z^{a_n} x^{n^2}` for exponent list *a*,
precomputed powers *z* and parity *p* (being 0 or 1).
Expand Down Expand Up @@ -633,7 +632,7 @@ Currently, these methods require *chi* to be a primitive character.
is the root number as computed by :func:`acb_dirichlet_root_number`.
The first *len* terms in the Taylor expansion are written to the output.

.. function:: 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)
.. function:: 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)

Computes the Hardy Z-function, also known as the Riemann-Siegel Z-function
`Z(t) = e^{i \theta(t)} L(1/2+it)`, which is real-valued for real *t*.
Expand Down
2 changes: 1 addition & 1 deletion doc/source/acb_hypgeom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ see :ref:`algorithms_hypergeometric_asymptotic_confluent`.
Generalized hypergeometric function
-------------------------------------------------------------------------------

.. function:: 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)
.. function:: 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)

Computes the generalized hypergeometric function `{}_pF_{q}(z)`,
or the regularized version if *regularized* is set.
Expand Down
2 changes: 1 addition & 1 deletion doc/source/acb_mat.rst
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ Norms
Sets *b* to an upper bound for the infinity norm (i.e. the largest
absolute value row sum) of *A*.

.. function:: void acb_mat_frobenius_norm(acb_t res, const acb_mat_t A, slong prec)
.. function:: void acb_mat_frobenius_norm(arb_t res, const acb_mat_t A, slong prec)

Sets *res* to the Frobenius norm (i.e. the square root of the sum
of squares of entries) of *A*.
Expand Down
12 changes: 6 additions & 6 deletions doc/source/acb_poly.rst
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ Transforms

.. function:: void _acb_poly_graeffe_transform(acb_ptr b, acb_srcptr a, slong len, slong prec)

.. function:: void acb_poly_graeffe_transform(acb_poly_t b, acb_poly_t a, slong prec)
.. function:: void acb_poly_graeffe_transform(acb_poly_t b, const acb_poly_t a, slong prec)

Computes the Graeffe transform of input polynomial, which is of length *len*.
See :func:`arb_poly_graeffe_transform` for details.
Expand Down Expand Up @@ -776,7 +776,7 @@ Elementary functions
The underscore method supports aliasing and allows the input to be
shorter than the output, but requires the lengths to be nonzero.

.. function:: void _acb_poly_sin_cos_series(acb_ptr s, acb_ptr c, acb_srcptr h, slong hlen, slong n, slong prec)
.. function:: void _acb_poly_sin_cos_series(acb_ptr s, acb_ptr c, const acb_srcptr h, slong hlen, slong n, slong prec)
void acb_poly_sin_cos_series(acb_poly_t s, acb_poly_t c, const acb_poly_t h, slong n, slong prec)

Sets *s* and *c* to the power series sine and cosine of *h*, computed
Expand Down Expand Up @@ -808,7 +808,7 @@ Elementary functions
The underscore version does not support aliasing, and requires
the lengths to be nonzero.

.. function:: void _acb_poly_sin_cos_pi_series(acb_ptr s, acb_ptr c, acb_srcptr h, slong hlen, slong n, slong prec)
.. function:: void _acb_poly_sin_cos_pi_series(acb_ptr s, acb_ptr c, const acb_srcptr h, slong hlen, slong n, slong prec)

.. function:: void acb_poly_sin_cos_pi_series(acb_poly_t s, acb_poly_t c, const acb_poly_t h, slong n, slong prec)

Expand All @@ -827,15 +827,15 @@ Elementary functions
Compute the respective trigonometric functions of the input
multiplied by `\pi`.

.. function:: void _acb_poly_sinh_cosh_series_basecase(acb_ptr s, acb_ptr c, acb_srcptr h, slong hlen, slong n, slong prec)
.. function:: void _acb_poly_sinh_cosh_series_basecase(acb_ptr s, acb_ptr c, const acb_srcptr h, slong hlen, slong n, slong prec)

.. function:: void acb_poly_sinh_cosh_series_basecase(acb_poly_t s, acb_poly_t c, const acb_poly_t h, slong n, slong prec)

.. function:: void _acb_poly_sinh_cosh_series_exponential(acb_ptr s, acb_ptr c, acb_srcptr h, slong hlen, slong n, slong prec)
.. function:: void _acb_poly_sinh_cosh_series_exponential(acb_ptr s, acb_ptr c, const acb_srcptr h, slong hlen, slong n, slong prec)

.. function:: void acb_poly_sinh_cosh_series_exponential(acb_poly_t s, acb_poly_t c, const acb_poly_t h, slong n, slong prec)

.. function:: void _acb_poly_sinh_cosh_series(acb_ptr s, acb_ptr c, acb_srcptr h, slong hlen, slong n, slong prec)
.. function:: void _acb_poly_sinh_cosh_series(acb_ptr s, acb_ptr c, const acb_srcptr h, slong hlen, slong n, slong prec)

.. function:: void acb_poly_sinh_cosh_series(acb_poly_t s, acb_poly_t c, const acb_poly_t h, slong n, slong prec)

Expand Down
28 changes: 14 additions & 14 deletions doc/source/aprcl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Primality test functions
``PRIME``, ``COMPOSITE`` and ``PROBABPRIME``
(if we cannot prove primality).

.. function:: void aprcl_is_prime_gauss_min_R(const fmpz_t n, ulong R)
.. function:: int aprcl_is_prime_gauss_min_R(const fmpz_t n, ulong R)

Same as :func:`aprcl_is_prime_gauss` with fixed minimum value of `R`.

Expand Down Expand Up @@ -154,11 +154,11 @@ Memory management
Comparison
................................................................................

.. function:: slong unity_zp_is_unity(const unity_zp f)
.. function:: slong unity_zp_is_unity(unity_zp f)

If `f = \zeta^h` returns h; otherwise returns -1.

.. function:: int unity_zp_equal(const unity_zp f, const unity_zp g)
.. function:: int unity_zp_equal(unity_zp f, unity_zp g)

Returns nonzero if `f = g` reduced by the `p^{exp}`-th cyclotomic
polynomial.
Expand Down Expand Up @@ -227,7 +227,7 @@ Addition and multiplication
Sets `f` to `g \cdot g`.
`f`, `g` and `h` must be initialized with same `p`, `exp` and `n`.

.. function:: void unity_zp_mul_inplace(unity_zp f, const unity_zp g, const untiy_zp h, fmpz_t * t)
.. function:: void unity_zp_mul_inplace(unity_zp f, const unity_zp g, const unity_zp h, fmpz_t * t)

Sets `f` to `g \cdot h`. If `p^{exp} = 3, 4, 5, 7, 8, 9, 11, 16` special
multiplication functions are used. The preallocated array `t` of ``fmpz_t`` is
Expand All @@ -244,12 +244,12 @@ Addition and multiplication
Powering functions
................................................................................

.. function:: void unity_zp_pow_fmpz(unity_zp f, unity_zp g, const fmpz_t pow)
.. function:: void unity_zp_pow_fmpz(unity_zp f, const unity_zp g, const fmpz_t pow)

Sets `f` to `g^{pow}`. `f` and `g` must be initialized with
same `p`, `exp` and `n`.

.. function:: void unity_zp_pow_ui(unity_zp f, unity_zp g, ulong pow)
.. function:: void unity_zp_pow_ui(unity_zp f, const unity_zp g, ulong pow)

Sets `f` to `g^{pow}`. `f` and `g` must be initialized with
same `p`, `exp` and `n`.
Expand All @@ -259,7 +259,7 @@ Powering functions
Returns the smallest integer `k` satisfying
`\log (n) < (k(k + 1)2^{2k}) / (2^{k + 1} - k - 2) + 1`

.. function:: void unity_zp_pow_2k_fmpz(unity_zp f, unity_zp g, const fmpz_t pow)
.. function:: void unity_zp_pow_2k_fmpz(unity_zp f, const unity_zp g, const fmpz_t pow)

Sets `f` to `g^{pow}` using the `2^k`-ary exponentiation method.
`f` and `g` must be initialized with same `p`, `exp` and `n`.
Expand Down Expand Up @@ -352,7 +352,7 @@ Extended rings

Returns nonzero if `f = g`.

.. function:: ulong unity_zpq_p_unity(const unity_zpq f)
.. function:: slong unity_zpq_p_unity(const unity_zpq f)

If `f = \zeta_p^x` returns `x \in [0, p - 1]`; otherwise returns `p`.

Expand All @@ -364,17 +364,17 @@ Extended rings

Returns nonzero if `f` is a generator of the cyclic group `\langle\zeta_p\rangle`.

.. function:: void unity_zpq_coeff_set_fmpz(unity_zpq f, ulong i, ulong j, const fmpz_t x)
.. function:: void unity_zpq_coeff_set_fmpz(unity_zpq f, slong i, slong j, const fmpz_t x)

Sets the coefficient of `\zeta_q^i \zeta_p^j` to `x`.
`i` must be less than `q` and `j` must be less than `p`.

.. function:: void unity_zpq_coeff_set_ui(unity_zpq f, ulong i, ulong j, ulong x)
.. function:: void unity_zpq_coeff_set_ui(unity_zpq f, slong i, slong j, ulong x)

Sets the coefficient of `\zeta_q^i \zeta_p^j` to `x`.
`i` must be less than `q` and `j` must be less then `p`.

.. function:: void unity_zpq_coeff_add(unity_zpq f, ulong i, ulong j, const fmpz_t x)
.. function:: void unity_zpq_coeff_add(unity_zpq f, slong i, slong j, const fmpz_t x)

Adds `x` to the coefficient of `\zeta_p^i \zeta_q^j`. `x` must be less than `n`.

Expand All @@ -394,15 +394,15 @@ Extended rings

Sets `f = f \cdot \zeta_p`.

.. function:: void unity_zpq_mul_unity_p_pow(unity_zpq f, const unity_zpq g, ulong k)
.. function:: void unity_zpq_mul_unity_p_pow(unity_zpq f, const unity_zpq g, slong k)

Sets `f` to `g \cdot \zeta_p^k`.

.. function:: void unity_zpq_pow(unity_zpq f, unity_zpq g, const fmpz_t p)
.. function:: void unity_zpq_pow(unity_zpq f, const unity_zpq g, const fmpz_t p)

Sets `f` to `g^p`. `f` and `g` must be initialized with same `p`, `q` and `n`.

.. function:: void unity_zpq_pow_ui(unity_zpq f, unity_zpq g, ulong p)
.. function:: void unity_zpq_pow_ui(unity_zpq f, const unity_zpq g, ulong p)

Sets `f` to `g^p`. `f` and `g` must be initialized with same `p`, `q` and `n`.

Expand Down
2 changes: 1 addition & 1 deletion doc/source/arb.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1933,7 +1933,7 @@ Vector functions

Performs the respective scalar operation elementwise.

.. function:: void _arb_vec_get_mag(mag_t bound, arb_srcptr vec, slong len, slong prec)
.. function:: void _arb_vec_get_mag(mag_t bound, arb_srcptr vec, slong len)

Sets *bound* to an upper bound for the entries in *vec*.

Expand Down
6 changes: 3 additions & 3 deletions doc/source/arb_hypgeom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ Confluent hypergeometric functions

Computes the confluent hypergeometric function `U(a,b,z)`.

.. function:: void arb_hypgeom_u_integration(arb_t res, const arb_t a, const arb_t b, const arb_t z, int regularized, slong prec)
.. function:: void arb_hypgeom_u_integration(arb_t res, const arb_t a, const arb_t b, const arb_t z, slong prec)

Computes the confluent hypergeometric function `U(a,b,z)` using numerical integration
of the representation
Expand All @@ -196,7 +196,7 @@ Gauss hypergeometric function
Additional evaluation flags can be passed via the *regularized*
argument; see :func:`acb_hypgeom_2f1` for documentation.

.. function:: void arb_hypgeom_2f1_integration(arb_t res, const arb_t a, const arb_t b, const arb_t z, int regularized, slong prec)
.. function:: 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)

Computes the Gauss hypergeometric function using numerical integration
of the representation
Expand Down Expand Up @@ -600,7 +600,7 @@ Orthogonal polynomials and functions
.. function:: void arb_hypgeom_legendre_p_ui_zero(arb_t res, arb_t res_prime, ulong n, const arb_t x, slong K, slong prec)
void arb_hypgeom_legendre_p_ui_one(arb_t res, arb_t res_prime, ulong n, const arb_t x, slong K, slong prec)
void arb_hypgeom_legendre_p_ui_asymp(arb_t res, arb_t res_prime, ulong n, const arb_t x, slong K, slong prec)
void arb_hypgeom_legendre_p_rec(arb_t res, arb_t res_prime, ulong n, const arb_t x, slong prec)
void arb_hypgeom_legendre_p_ui_rec(arb_t res, arb_t res_prime, ulong n, const arb_t x, slong prec)
void arb_hypgeom_legendre_p_ui(arb_t res, arb_t res_prime, ulong n, const arb_t x, slong prec)

Evaluates the ordinary Legendre polynomial `P_n(x)`. If *res_prime* is
Expand Down
4 changes: 2 additions & 2 deletions doc/source/arb_poly.rst
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ Differentiation
Sets *{res, len - n}* to the nth derivative of *{poly, len}*. Does
nothing if *len <= n*. Allows aliasing of the input and output.

.. function:: void arb_poly_nth_derivative(arb_poly_t res, const arb_poly_t poly, slong prec)
.. function:: void arb_poly_nth_derivative(arb_poly_t res, const arb_poly_t poly, ulong n, slong prec)

Sets *res* to the nth derivative of *poly*.

Expand Down Expand Up @@ -692,7 +692,7 @@ Transforms

.. function:: void _arb_poly_graeffe_transform(arb_ptr b, arb_srcptr a, slong len, slong prec)

.. function:: void arb_poly_graeffe_transform(arb_poly_t b, arb_poly_t a, slong prec)
.. function:: void arb_poly_graeffe_transform(arb_poly_t b, const arb_poly_t a, slong prec)

Computes the Graeffe transform of input polynomial.

Expand Down
6 changes: 3 additions & 3 deletions doc/source/arith.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ Stirling numbers
To compute a full row, this function can be called with
``klen = n+1``. It is assumed that ``klen`` is at most `n + 1`.

.. function:: void arith_stirling_number_1u_vec_next(fmpz * row, fmpz * prev, slong n, slong klen)
.. function:: void arith_stirling_number_1u_vec_next(fmpz * row, const fmpz * prev, slong n, slong klen)

.. function:: void arith_stirling_number_1_vec_next(fmpz * row, fmpz * prev, slong n, slong klen)
.. function:: void arith_stirling_number_1_vec_next(fmpz * row, const fmpz * prev, slong n, slong klen)

.. function:: void arith_stirling_number_2_vec_next(fmpz * row, fmpz * prev, slong n, slong klen)
.. function:: void arith_stirling_number_2_vec_next(fmpz * row, const fmpz * prev, slong n, slong klen)

Given the vector ``prev`` containing a row of Stirling numbers
``S(n-1,0), S(n-1,1), S(n-1,2), ..., S(n-1,klen-1)``, computes
Expand Down
14 changes: 7 additions & 7 deletions doc/source/ca.rst
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ Context objects
This function should only be called after all :type:`ca_t` instances
referring to this context have been cleared.

.. function:: void ca_ctx_print(const ca_ctx_t ctx)
.. function:: void ca_ctx_print(ca_ctx_t ctx)

Prints a description of the context *ctx* to standard output.
This will give a complete listing of the cached fields in *ctx*.
Expand Down Expand Up @@ -298,20 +298,20 @@ printed in various styles::
3.36603 {(a+5)/2 in QQ(a)/<a^2-3> where a = 1.73205 [a^2-3=0]}
1.61889 + 4.44288*I {a*c+b*c*d in QQ(a,b,c,d)/<c^2-2, d^2+1> where a = 1.14473 [Log(3.14159 {b in QQ(b)})], b = 3.14159 [Pi], c = 1.41421 [c^2-2=0], d = I [d^2+1=0]}

.. function:: void ca_print(const ca_t x, const ca_ctx_t ctx)
.. function:: void ca_print(const ca_t x, ca_ctx_t ctx)

Prints *x* to standard output.

.. function:: void ca_fprint(FILE * fp, const ca_t x, const ca_ctx_t ctx)
.. function:: void ca_fprint(FILE * fp, const ca_t x, ca_ctx_t ctx)

Prints *x* to the file *fp*.

.. function:: char * ca_get_str(const ca_t x, const ca_ctx_t ctx)
.. function:: char * ca_get_str(const ca_t x, ca_ctx_t ctx)

Prints *x* to a string which is returned.
The user should free this string by calling ``flint_free``.

.. function:: void ca_printn(const ca_t x, slong n, const ca_ctx_t ctx)
.. function:: void ca_printn(const ca_t x, slong n, ca_ctx_t ctx)

Prints an *n*-digit numerical representation of *x* to standard output.

Expand Down Expand Up @@ -423,7 +423,7 @@ Conversion of algebraic numbers
* TODO: if possible, coerce *x* to a low-degree cyclotomic field.

.. function:: int ca_get_fmpz(fmpz_t res, const ca_t x, ca_ctx_t ctx)
int ca_get_fmpq(fmpz_t res, const ca_t x, ca_ctx_t ctx)
int ca_get_fmpq(fmpq_t res, const ca_t x, ca_ctx_t ctx)
int ca_get_qqbar(qqbar_t res, const ca_t x, ca_ctx_t ctx)

Attempts to evaluate *x* to an explicit integer, rational or
Expand Down Expand Up @@ -1550,7 +1550,7 @@ Internal representation
an :type:`nf_elem_t`.


.. function:: void _ca_make_field_element(ca_t x, slong new_index, ca_ctx_t ctx)
.. function:: void _ca_make_field_element(ca_t x, ca_field_srcptr new_index, ca_ctx_t ctx)

Changes the internal representation of *x* to that of an element
of the field with index *new_index* in the context object *ctx*.
Expand Down
2 changes: 1 addition & 1 deletion doc/source/ca_ext.rst
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ Structure
Input and output
-------------------------------------------------------------------------------

.. function:: void ca_ext_print(const ca_ext_t x, const ca_ctx_t ctx)
.. function:: void ca_ext_print(const ca_ext_t x, ca_ctx_t ctx)

Prints a description of *x* to standard output.

Expand Down
Loading
Loading