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 - buch3.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30702-bddb8d6928) Lines: 1523 1633 93.3 %
Date: 2026-02-23 02:23:56 Functions: 120 125 96.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
bnrinit0 0
dft_bound 0
isprincipalraygen 0
minkowski_bound 0
nf_deg1_prime 0
bnrclassnolist 6
bnrconductorofchar 6
ZM_intersect 11
bnrcompositum 11
bnrlcmcond 11
rnfnormgroup 12
decodemodule 18
discrayabslist 18
is_module 18
bnrliftsubgroup 22
compute_M0 23
bnrclassno_1 24
chk_listBU 24
discrayabslistarch 24
zsimp 24
bnfcertify 25
isprimitive 26
regulatorbound 26
rnfconductor 27
bnfnarrow 30
bnrisconductor0 30
minimforunits 33
bnrdisclist0 42
Hermite_bound 49
bnfcertify0 49
bound_unit_index 49
init_bad 49
lowerboundforregulator 49
zimmertbound 49
bnrconductor0 54
bnrclassno0 90
bnrclassno 96
get_nz 144
bnrdisc0 150
fasmall_append 150
bnrgaloismatrix 198
ABC_to_bnr 234
bnr_vecchar_sanitize 300
subgrouplist_cond_sub 325
factordivexact 348
get_NR1D 366
bnrisgalois 384
check_bnrgal 384
get_discdata 402
get_discray 402
zsimpjoin 444
bnrconductormod 448
bnrconductor_factored 510
bnrchar 513
bnrchar_i 513
bnrconductor 528
bnrmap 528
rnfconductor0 688
rnfnormgroup_i 690
factorpow 696
ZMV_mul 780
get_classno 780
hdet 876
rowselect_p 876
factormul 894
bnrclassno_all 948
factorsplice 1002
is_complex 1052
abmap_char_image 1056
bnr_char_sanitize 1080
vecselect_p 1152
abmap_nchar_image 1233
check_prime 1235
primecertify 1235
Lbnrclassno 1272
prV_norms 1344
bnrdisc 1410
bnrdisc_i 1410
is_zero 1544
bnrautmatrix 2652
idealmoddivisor 3010
bnrgaloisapply 3066
make_integral_Z 3742
bnrconductor_raw 4217
bnrconductor_factored_i 4727
quotient_expo 5146
bnr_subgroup_sanitize 7844
get_pinvpi 8449
get_pi 8569
idealmoddivisor_aux 12243
too_big 12627
bnrsurjection 12994
fast_val 15404
bnr_get_Ui 21670
compute_fact 21850
bnr_grp 27646
Buchray 35082
bnr_sanitize 35777
get_Gen 41200
bnrtoprimitive 48297
is_unit 50438
bnrconductor_factored_arch 53024
cond0_e 53024
condoo_archp 53024
subgroup_conductor_ok 81532
bnr_log_gen_arch 95059
subgroupcond 156482
conductor_elts 156807
subgrouplist0 158371
bnrinitmod 181136
ZM_content_mul 205145
Buchraymod 217084
Buchraymod_i 230765
bnrisconductor 235763
bnr_subgroup_check 235812
isprincipalray 328284
bnrisprincipal 334356
bnr_log_gen_pr 413904
contains 425679
ideallog_to_bnr 508963
ideallog_to_bnr_i 523326
ZM2_ZC2_mul 1170523
bnrisprincipalmod 1271641
bnr_get_El 1275617
bnr_get_U 1692480

Generated by: LCOV version 1.16