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 30702-bddb8d6928) Lines: 1146 1220 93.9 %
Date: 2026-02-23 02:23:56 Functions: 101 103 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
genus2_red5 0
nfellcharpoly 0
hyperellminimaldisc 12
is_sing 12
F2xqX_quad_nbroots 18
F2x_genus2_find_trans 24
genus2_eulerfact2 24
F2x_genus_red 30
genus2_eulerfact2_semistable 30
hyperellordinate 30
redqfbsplit 30
F2x_genus2_trans 36
algo56bis 36
hyperellred 36
F2x_pseudodisc 48
Zst_red3 66
genus2_halfstablemodel 66
genus2_halfstablemodel_i 66
F2x_genus2charpoly_naive 72
ZX_apolar 78
F2x_genus_redoo 90
ellfromeqncharpoly 120
ZXM_to_padic 126
Fq_get_UV 132
ZlXQX_hyperellpadicfrobenius 132
ZpXQXXQ_invsqrt 132
nfhyperellpadicfrobenius 132
get_extremal 180
FlxV_constant 234
Flx_difftable 234
Flx_genus2charpoly_naive 234
genus2_type5 300
hyperellextremalmodels 300
FpXXX_Fp_mul 378
FpXXX_red 378
ZpXQXXQ_sqr 384
Fq_diff_red 402
ZXC_to_padic 402
ZXX_to_FpXC 402
ZpXQXXQ_frob 402
genus2_eulerfact_semistable 456
genus2_redmodel 456
Zst_normval 504
Zst_red1 504
Zst_val 504
hyperellpadicfrobenius0 510
charpoly_funceq 582
hyperell_Weil_bound 588
genus2charpoly 762
genus2_eulerfact 810
hyperellcharpoly 900
RgXY_swapsafe 1008
Zst_reduce 1008
ZM_to_padic 1122
ZlX_hyperellpadicfrobenius 1122
ZpXXQ_invsqrt 1122
get_UV 1122
hyperellpadicfrobenius 1122
ZpXQXXQ_mul 1164
FlxV_Fl2_eval_pre 1386
ZX_to_padic 1494
get_basis 1512
ZpXQXXQ_red 1548
FpXXX_renormalize 1926
xdminusone 2508
algo57bis 2640
next_model 2676
FpXXQ_sqr 2916
hyperellisoncurve 2994
frac_to_Fq 5634
ZX_hyperellred 7022
red_Cremona_Stoll 7022
ZC_to_padic 8652
ZpXXQ_frob 8652
diff_red 8652
revdigits 10308
polreduce 14044
FpXXQ_mul 14454
FpXXQ_red 17370
Fl2V_next 38484
minimalmodel_getH 43487
algo56 43541
hyperell_reverse 43565
algo51 43577
algo57 45455
hyperellminimalmodel 45467
minimalmodel_merge 45467
check_hyperell_Q 45503
check_hyperell_vc 55956
check_hyperell_Rg 55968
hyperellchangecurve 55968
algo52 88597
hyperell_redQ 90922
hyperelldisc 101969
get_ep 108502
frac_to_Fp 114726
test53 126336
ZX2_affine_unscale 140200
ZX2_unscale 145346
test55 162423
check_hyperell 247881
RgX_RgM2_eval 260353
to_ZX 882006

Generated by: LCOV version 1.16