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) Coverage Total Hit
Test: PARI/GP v2.18.1 lcov report (development 31042-0fbe168e69) Lines: 96.9 % 1606 1556
Test Date: 2026-07-23 17:04:59 Functions: 99.3 % 135 134
Legend: Lines:     hit not hit

Function Name Sort by function name Hit count Sort by function hit count
F2x_genus2_find_trans 1106
F2x_genus2_trans 1547
F2x_genus2charpoly_naive 392
F2x_genus_red 938
F2x_genus_redoo 2814
F2x_pseudodisc 1834
F2xqX_quad_nbroots 896
Fl2V_next 97965182
FlxV_Fl2_eval_pre 766955
FlxV_constant 19544
Flx_difftable 19544
Flx_difftable_constant 94234
Flx_genus2charpoly_naive 19544
Flx_genus2trace_naive 94234
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_hom_evaly 2331
RgX_remswap 1722
ZC_to_padic 10094
ZM_to_padic 1309
ZX2_affine_unscale 173325
ZX2_unscale 180246
ZXC_to_padic 469
ZXM_to_padic 147
ZXX_to_FpXC 469
ZX_apolar 1505
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 55355
algo52 111190
algo52_F4 651
algo56 54004
algo56bis 1351
algo57 56251
algo57bis 3563
cf 651
cfu 651
charpoly_funceq 679
check_hyperell 409364
check_hyperell_Q 56307
check_hyperell_Rg 155078
check_hyperell_vc 154511
checkhyperellpt_i 413
checkisom 2107
diff_red 10094
dirgenus2 98336
dirgenus2_worker 8470
ellfromeqncharpoly 637
frac_to_Fp 133847
frac_to_Fq 6573
ftrans 721
genus2_eulerfact 1442
genus2_eulerfact2 1127
genus2_eulerfact2_semistable 938
genus2_eulerfact_semistable 1015
genus2_halfstablemodel 77
genus2_halfstablemodel_i 77
genus2_red2 217
genus2_red5 14
genus2_redmodel 1015
genus2_tr2 651
genus2_type5ns 819
genus2_type5ns_2 1127
genus2charpoly 1806
get_UV 1309
get_basis 1764
get_ep 136183
get_extremal_even 581
get_extremal_odd 0
hyperell_Weil_bound 686
hyperell_redQ 112516
hyperell_reverse 54907
hyperellauto 168
hyperellchangecompose 63
hyperellchangecurve 110509
hyperellchangeinvert 43561
hyperellchangepoint 259
hyperellchangepointinv 70
hyperellchangevar 2681
hyperellcharpoly 20629
hyperelldegree 3759
hyperelldisc 122534
hyperellextremalmodels 7
hyperellextremalmodels_i 1715
hyperellextremalmodels_nb 1722
hyperellgenus 544674
hyperellisisom 84
hyperellisisom_M0 539
hyperellisisom_gen 539
hyperellisom_finalize 52219
hyperellisoncurve 84
hyperellminimaldisc 14
hyperellminimalmodel 56265
hyperellordinate 70
hyperellpadicfrobenius 1309
hyperellpadicfrobenius0 595
hyperellred 42
is_sing 14
minimalmodel_merge 56265
next_model 4914
nfM_primpart 322
nfhyperellisisom 252
nfhyperellpadicfrobenius 154
polreduce 16386
random_SL2 574
red_Cremona_Stoll 8193
redqfbsplit 35
revdigits 12026
test53 152517
test55 202829
to_ZX 1029749
vecan_genus2 553
wprojtoaff 329
xdminusone 8834

Generated by: LCOV version 2.0-1