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 30849-48ff4d246c) Lines: 1399 1480 94.5 %
Date: 2026-05-01 09:26:53 Functions: 120 123 97.6 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
genus2_red5 0
get_extremal_odd 0
nfellcharpoly 0
hyperellextremalmodels 7
hyperellminimaldisc 14
is_sing 14
redqfbsplit 35
hyperellred 42
hyperellchangecompose 63
hyperellchangepointinv 70
hyperellordinate 70
Zst_red3 77
genus2_halfstablemodel 77
genus2_halfstablemodel_i 77
hyperellisisom 84
hyperellisoncurve 84
ZXM_to_padic 147
Fq_get_UV 154
ZlXQX_hyperellpadicfrobenius 154
ZpXQXXQ_invsqrt 154
nfhyperellpadicfrobenius 154
hyperellauto 168
F2xqX_quad_nbroots 210
genus2_eulerfact2 224
F2x_genus_red 231
genus2_eulerfact2_semistable 231
F2x_genus2_find_trans 238
get_extremal_even 252
nfhyperellisisom 252
hyperellchangepoint 259
F2x_genus2_trans 280
nfM_primpart 322
algo56bis 329
wprojtoaff 329
F2x_genus2charpoly_naive 392
checkhyperellpt_i 413
F2x_pseudodisc 434
FpXXX_Fp_mul 441
FpXXX_red 441
ZpXQXXQ_sqr 448
Fq_diff_red 469
ZXC_to_padic 469
ZXX_to_FpXC 469
ZpXQXXQ_frob 469
hyperellisisom_M0 553
hyperellisisom_gen 553
Zst_normval 588
Zst_red1 588
Zst_val 588
hyperellpadicfrobenius0 595
random_SL2 602
ellfromeqncharpoly 623
charpoly_funceq 679
hyperell_Weil_bound 686
F2x_genus_redoo 693
genus2charpoly 889
genus2_eulerfact_semistable 1015
genus2_redmodel 1015
genus2_type5 1029
hyperellextremalmodels_i 1029
hyperellextremalmodels_nb 1036
RgXY_swapsafe 1176
Zst_reduce 1176
ZM_to_padic 1309
ZlX_hyperellpadicfrobenius 1309
ZpXXQ_invsqrt 1309
get_UV 1309
hyperellpadicfrobenius 1309
ZpXQXXQ_mul 1358
genus2_eulerfact 1428
ZX_apolar 1505
ZX_to_padic 1743
get_basis 1764
ZpXQXXQ_red 1806
checkisom 2107
FpXXX_renormalize 2247
RgX_hom_evaly 2429
hyperellchangevar 2709
FpXXQ_sqr 3402
algo57bis 3563
hyperelldegree 3815
next_model 3892
xdminusone 5852
frac_to_Fq 6573
ZX_hyperellred 8193
red_Cremona_Stoll 8193
ZC_to_padic 10094
ZpXXQ_frob 10094
diff_red 10094
revdigits 12026
polreduce 16386
FpXXQ_mul 16863
FlxV_constant 19544
Flx_difftable 19544
Flx_genus2charpoly_naive 19544
FpXXQ_red 20265
hyperellcharpoly 20629
hyperellchangeinvert 43561
algo56 52219
hyperellisom_finalize 52219
hyperell_reverse 52450
algo51 52548
algo57 54452
hyperellminimalmodel 54466
minimalmodel_merge 54466
check_hyperell_Q 54508
algo52 105520
hyperell_redQ 108918
hyperellchangecurve 110509
hyperelldisc 120735
get_ep 130121
frac_to_Fp 133847
test53 149129
check_hyperell_vc 154511
check_hyperell_Rg 155078
ZX2_affine_unscale 167060
ZX2_unscale 173274
test55 194534
check_hyperell 403981
hyperellgenus 539277
FlxV_Fl2_eval_pre 766955
to_ZX 1029007
Fl2V_next 97965182

Generated by: LCOV version 1.16