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 - kernel/none - level1.h (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30552-d1d0643eee) Lines: 605 680 89.0 %
Date: 2025-11-24 09:22:36 Functions: 214 238 89.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Mod64 0
affectsign 0
divsi_rem 0
divss 0
divss_rem 0
dvdiiz 0
dvdisz 0
dvdiuz 0
dvmdis 0
dvmdsi 0
dvmdss 0
get_avma 0
mod64 0
modss 0
mpceil 0
mpfloor 0
rdivis 0
rdivsi 0
remis 0
remsi 0
remss 0
sdivss_rem 0
shiftl 0
shiftlr 0
mptrunc 49
real_m2n 126
absr 140
varnmax 203
mod32 259
dvdsi 371
real_m1 455
mpcopy 665
ugcdui 2737
thuemorseu 2851
stack_calloc_align 3307
varnmin 15547
uabsdivui_rem 16693
addss 25067
subss 25067
subuu 25067
dvdis 33709
cmprs 40996
cgetr_block 43875
sdivsi 102149
stack_calloc 110570
gc_stoi 155886
dvdui 167195
subis 170995
mod16 241354
Fl_ellj_pre 242602
truedivis 266840
mindd 270158
cmpri 282310
Mod32 311108
uutoineg 355375
Mod16 389733
cgetg_block 408358
gc_utoi 468516
dvdiu 576570
mpdiv 667727
cmpsr 796104
rdivss 839647
real2n 1067441
addri 1109317
gc_utoipos 1153863
real_0 1156700
equalis 1181631
equalsi 1181813
mpround 1216547
absrnz_equal2n 1292426
umodui 1296416
cmpss 1427033
Mod8 2073878
mpcmp 2227429
udivuu_rem 2416419
Mod2 2479231
gc_int 2574319
mulru 2765892
subir 3006705
equaliu 3018566
equalui 3018566
itou_or_0 3041673
maxdd 3182665
cmpis 3634906
negr 3670785
ceildivuu 3846367
cmpsi 3866905
Fl_center 4486495
absrnz_equal1 4519420
real_1_bit 4706483
maxuu 4815057
mod4 4932576
umuluu_or_0 5546399
umuluu_le 5803291
subri 6079272
subsi 6117336
truedivsi 6202031
affsi 6383572
mulrs 7181596
fractor 7376753
gc_NULL 7969114
cmpir 9434503
ugcdiu 10077603
cmpiu 10118983
cmpui 10119034
affectsign_safe 10737756
uabsdiviu_rem 11892741
addrs 12304407
smodss 12526390
rdivii 13099026
rdiviiz 13145650
mod8 13270622
mpabs_shallow 13428463
utor 13463456
affur 13463569
divii 14047103
subrs 16476486
dvdii 16558216
Fl_halve 18024858
modis 19638526
smodis 21176060
evalvalser 21527935
int_bit 22320667
hammingu 24048638
abscmpui 32386962
abscmpiu 32387095
mulri 38034002
mpexpo 38851653
absequaliu 39660542
absequalui 41409468
itos_or_0 43596863
Mod4 43773916
modsi 45225555
affui 45473824
Fl_div 46515311
stack_malloc 46643450
truedivii 46777162
umodi2n 49026130
sdivsi_rem 51429881
gc_bool 51998636
gc_ulong 52171038
affrr_fixlg 54648023
stack_malloc_align 55485257
absi_shallow 57445007
Fl_addmulmul_pre 60019043
mod2 61153127
minuu 69059556
remlll_pre 75569304
evalprecp 78665791
evalvalp 81622909
mpsqr 90968097
Fl_sqr 94862969
Fl_triple 95265178
addiu 95456420
addui 99106229
mod2BIL 103590965
fixlg 104145805
mpodd 115085724
icopyspec 117029966
togglesign_safe 125505289
real_1 129769366
subiu 131685435
subui 136670418
mpshift 153187278
dvmduBIL 165686463
itou 177093053
shiftr 177971579
addis 181552868
gc_double 184391482
vali 190347454
varncmp 217212820
gc_long 242068804
mpsub 251466369
utoineg 294173023
cgetineg 295030573
rtor 295275078
addsi 306737344
muliu 373576457
itos 462016745
mulis 463124258
shiftr_inplace 463757721
Fl_double 469289146
addir 479856961
real_0_bit 480225051
affsr 486036806
stor 486328842
mpadd 575253094
negi 636727469
itor 713071610
Fl_neg 716565358
umodsu 724200459
stoi 772537453
expu 775301319
lg2prec 797819164
mpmul 838335353
rcopy 902695582
affii 909120248
mpneg 916660256
subrr 1000071421
cgetg_copy 1479787737
cmpuu 1492629583
cgetr 1838312308
togglesign 1910950292
minss 2008465839
absi 2060439316
mpabs 2131239527
Fl_sqr_pre 2153602275
setabssign 2197926802
nbits2lg 2363847152
Fl_mul 2414243214
expi 2453171224
addrr 2876442369
remii 3012328716
adduu 3410912189
stackdummy 3640796338
Fl_mul_pre 4091036566
Fl_add 4380481382
leafcopy 4964738220
shift_right 5625149174
dvmdsBIL 7013380471
Fl_sub 7284709006
subii 7664636080
shift_left 7682336179
Fl_addmul_pre 7691700689
uutoi 8807532396
icopy 9055670834
maxss 9723181977
utoi 11898610121
addii 12405707574
evalexpo 13124963885
utoipos 14142492426
gc_const 15513179573
cgetipos 16301430410
cgetg 24528403767
cgeti 27127421260
new_chunk 93234594559
evallg 95201405045
set_avma 128962844058

Generated by: LCOV version 1.16