gr_test_approx_unary_op, gr_test_approx_binary_op, gr_test_approx_binary_op_type_variants, gr_test_approx_dot
Synopsis
#include <flint/gr.h>int gr_test_approx_unary_op(gr_ctx_t R, gr_method_unary_op op, gr_ctx_t R_ref, gr_srcptr rel_tol, flint_rand_t state, int test_flags)sourceint gr_test_approx_binary_op(gr_ctx_t R, gr_method_binary_op op, gr_ctx_t R_ref, gr_srcptr rel_tol, flint_rand_t state, int test_flags)sourceint gr_test_approx_binary_op_type_variants(gr_ctx_t R, const char * opname, gr_method_binary_op gr_op, gr_method_binary_op_ui gr_op_ui, gr_method_binary_op_si gr_op_si, gr_method_binary_op_fmpz gr_op_fmpz, gr_method_binary_op_fmpq gr_op_fmpq, int fused, int small_test_values, gr_srcptr rel_tol, flint_rand_t state, int test_flags)sourceint gr_test_approx_dot(gr_ctx_t R, gr_ctx_t R_ref, slong maxlen, gr_srcptr rel_tol, flint_rand_t state, int test_flags)sourceTests for approximate (floating-point) rings: compute an operation, its type variants, or a dot product of length at most maxlen in R and in a more precise reference ring R_ref (for example balls), and check that the relative error is at most rel_tol, an element of R_ref. For the type variants, fused selects the addmul-type signature and small_test_values restricts the scalar operands to small values. These functions abort on failure.
Cite this page
The FLINT team, “gr_test_approx_unary_op, gr_test_approx_binary_op, gr_test_approx_binary_op_type_variants, gr_test_approx_dot (gr.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr/gr_test_approx_unary_op.html (generated 2026-10-20).
@misc{flint-doc-gr-gr-test-approx-unary-op,
author = {{The FLINT team}},
title = {{gr\_test\_approx\_unary\_op, gr\_test\_approx\_binary\_op, gr\_test\_approx\_binary\_op\_type\_variants, gr\_test\_approx\_dot (gr.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/gr/gr_test_approx_unary_op.html},
note = {Generated 2026-10-20}
}