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 - nffactor.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30670-52869c8c38) Lines: 1223 1314 93.1 %
Date: 2026-02-05 09:23:49 Functions: 75 79 94.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FlxqXQV_fixedalg 0
FpC_ratlift 5329751
FpM_ratlift 2781800
FpX_ratlift 363498
FqX_centermod 52933
QXQX_gcd 3003
QXQX_normalize 36239
RgX_galconj_bound 63
RgX_int_normalize 36645
ZXQX_gcd 5264
ZXirred_is_cyclo_translate 2940
ZqX 18382
ZqX_normalize 18347
_norml2 477313
arch_for_T2 202266
bestlift_bound 18382
bestlift_init 18382
cmbf_maxK 112679
ensure_lt_INT 34916
fact_from_sqff 12572
fix_nf 34748
fixedalg_order 0
get_Bhigh 12166
get_R 18600
get_V 476
get_good_factor 450940
get_maxf 30898
get_nbprimes 30898
get_nfsqff_data 34902
get_trace 206125
guess_roots 24997
init_div_data 18417
init_proj 18382
init_trace 24150
lead_simplify 118757
lift_to_frac 27316700
max_radius 18600
nf_Beauzamy_bound 12075
nf_DDF_roots 6265
nf_L2_bound 22662
nf_LLL_cmbf 91
nf_Mignotte_bound 12075
nf_bestlift 261432
nf_bestlift_to_pol 156592
nf_chk_factors 98
nf_combine_factors 12075
nf_factor_bound 12075
nf_pick_prime 30898
nf_pol_lift 36602
nf_root_bounds 18340
nf_to_Zq 161301
nfcmbf 12075
nffactor 12894
nffactor_i 12901
nffactormod 7
nfgcd 48046
nfgcd_all 88345
nfissquarefree 49826
nfroots 40236
nfroots_if_split 21
nfrootsof1 64714
nfsqff 39480
nfsqff_trager 175
nfsqff_use_Trager 65820
normTp 25018
normlp 20902
polfnf 14
proper_nf 12299
record 125222
rnfabelianconjgen 0
rnfabelianconjgen_i 42
rnffrobeniuslift 35
rnfgaloisanalysis 35
rnfgaloisconj_bound 42
rnfisabelian 42
trivroots 55579
update_target 24409
update_trace 208860
zerofact 0

Generated by: LCOV version 1.16