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

Generated by: LCOV version 1.16