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 - base5.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30702-bddb8d6928) Lines: 1085 1587 68.4 %
Date: 2026-02-23 02:23:56 Functions: 75 88 85.2 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
K6_invar 0
K6_pol 0
condliftA4 0
condliftA5 0
condliftS4 0
condliftpA4 0
condliftpA5 0
condliftpS4 0
decind 0
decmat 0
eltdown 0
nfsnf 0
rnfidealreltoabs 0
rnfpolred 5
nfreduce 6
RgV_find_denom 10
mattocomplex 10
nf_all_roots 10
rnfT2 10
rnflllgram 10
rnfidealfactor 25
fail 36
nfsnf0 36
rnfidealmul 40
check_0 60
do_SWAP 70
prodidnorm 75
rnfpseudobasis 91
rnfideal0 110
nftau 140
rnfidealnormrel 140
rnfidealnormabs 145
rowcomb 146
rnfidealdown 155
rnfidealup 160
rnfidealreltoabs0 170
rnfidealup0 175
rnfidealtwoelement 185
element_mulvecrow 234
rnfscal 255
RED 260
findmin 260
nf_rnfeqsimple 317
rnfidealabstorel 325
rnfV_to_nfM 345
nfeltup 355
rnfidealreltoabs_i 355
rnfprincipaltohnf 550
nftocomplex 730
nfdetint 819
rnfidealhnf 950
rnfinit 1099
mkupdown 2191
nfhnf 2208
nfhnf0 2219
mknfabs 2239
nfhnfmod 2367
rnf_zkabs 2414
rnfinit0 2576
nf_nfzk 2616
nf_rnfeq 2621
rnfeltdown 2672
modulereltoabs 2744
rnfeltdown0 3008
rnfdisc_get_T 4067
rnfdisc_get_T_i 4067
idV_simplify 4551
rnfequation2 9309
element_close 18820
nfcleanmod 20255
rnfeltup 20932
eltabstorel 26697
rnfidealprimedec 27968
rnfidealprimedec_1 27968
rnfequation 29212
zero_nfbezout 30745
eltabstorel_lift 31609
nfbezout 34428
rnfequation0 41412
rnfequationall 41729
rnfeltup0 44971
colcomb 50304
rnfcomplete 53016
rnfeltabstorel 61901
colcomb1 63505
eltreltoabs 95667
rnf_build_nfabs 143996
rnfeltreltoabs 168691

Generated by: LCOV version 1.16