Code coverage tests

This page documents the degree to which the PARI/GP source code is tested by our public test suite, distributed with the source distribution in directory src/test/. This is measured by the gcov utility; we then process gcov output using the lcov frond-end.

We test a few variants depending on Configure flags on the pari.math.u-bordeaux.fr machine (x86_64 architecture), and agregate them in the final report:

The target is to exceed 90% coverage for all mathematical modules (given that branches depending on DEBUGLEVEL or DEBUGMEM are not covered). This script is run to produce the results below.

LCOV - code coverage report
Current view: top level - basemath - hyperell.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30759-17b423fb9b) Lines: 1173 1251 93.8 %
Date: 2026-03-20 09:26:27 Functions: 104 107 97.2 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
F2x_genus2_find_trans 238
F2x_genus2_trans 280
F2x_genus2charpoly_naive 392
F2x_genus_red 231
F2x_genus_redoo 693
F2x_pseudodisc 434
F2xqX_quad_nbroots 210
Fl2V_next 97965182
FlxV_Fl2_eval_pre 766955
FlxV_constant 19544
Flx_difftable 19544
Flx_genus2charpoly_naive 19544
FpXXQ_mul 16863
FpXXQ_red 20265
FpXXQ_sqr 3402
FpXXX_Fp_mul 441
FpXXX_red 441
FpXXX_renormalize 2247
Fq_diff_red 469
Fq_get_UV 154
RgXY_swapsafe 1176
RgX_RgM2_eval 306561
ZC_to_padic 10094
ZM_to_padic 1309
ZX2_affine_unscale 167032
ZX2_unscale 173246
ZXC_to_padic 469
ZXM_to_padic 147
ZXX_to_FpXC 469
ZX_apolar 1491
ZX_hyperellred 8193
ZX_to_padic 1743
ZlXQX_hyperellpadicfrobenius 154
ZlX_hyperellpadicfrobenius 1309
ZpXQXXQ_frob 469
ZpXQXXQ_invsqrt 154
ZpXQXXQ_mul 1358
ZpXQXXQ_red 1806
ZpXQXXQ_sqr 448
ZpXXQ_frob 10094
ZpXXQ_invsqrt 1309
Zst_normval 588
Zst_red1 588
Zst_red3 77
Zst_reduce 1176
Zst_val 588
algo51 52534
algo52 105506
algo56 52205
algo56bis 329
algo57 54438
algo57bis 3563
charpoly_funceq 679
check_hyperell 314157
check_hyperell_Q 54494
check_hyperell_Rg 65296
check_hyperell_vc 65282
diff_red 10094
ellfromeqncharpoly 623
frac_to_Fp 133847
frac_to_Fq 6573
genus2_eulerfact 1428
genus2_eulerfact2 224
genus2_eulerfact2_semistable 231
genus2_eulerfact_semistable 1015
genus2_halfstablemodel 77
genus2_halfstablemodel_i 77
genus2_red5 0
genus2_redmodel 1015
genus2_type5 1029
genus2charpoly 889
get_UV 1309
get_basis 1764
get_ep 130093
get_extremal_even 252
get_extremal_odd 0
hyperell_Weil_bound 686
hyperell_redQ 108890
hyperell_reverse 52436
hyperellchangecurve 65296
hyperellcharpoly 20629
hyperelldisc 120721
hyperellextremalmodels 7
hyperellextremalmodels_i 1029
hyperellextremalmodels_nb 1036
hyperellgenus 360196
hyperellisoncurve 3493
hyperellminimaldisc 14
hyperellminimalmodel 54452
hyperellordinate 35
hyperellpadicfrobenius 1309
hyperellpadicfrobenius0 595
hyperellred 42
is_sing 14
minimalmodel_getH 50735
minimalmodel_merge 54452
next_model 3892
nfellcharpoly 0
nfhyperellpadicfrobenius 154
polreduce 16386
red_Cremona_Stoll 8193
redqfbsplit 35
revdigits 12026
test53 149115
test55 194492
to_ZX 1029007
xdminusone 5852

Generated by: LCOV version 1.16