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 30572-91e0396466) Lines: 605 680 89.0 %
Date: 2025-12-13 09:22:30 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 43872
sdivsi 102145
stack_calloc 110582
gc_stoi 155883
dvdui 167195
subis 170989
mod16 241353
Fl_ellj_pre 242642
truedivis 267030
mindd 270165
cmpri 282310
Mod32 311108
uutoineg 355618
Mod16 389733
cgetg_block 408508
gc_utoi 468580
dvdiu 576584
mpdiv 667751
cmpsr 796099
rdivss 839647
real2n 1067492
addri 1109443
gc_utoipos 1153896
real_0 1156782
equalis 1182173
equalsi 1182355
mpround 1216579
absrnz_equal2n 1292751
umodui 1296416
cmpss 1427033
Mod8 2073848
mpcmp 2227697
udivuu_rem 2416426
Mod2 2479128
gc_int 2574341
mulru 2765892
subir 3006727
equaliu 3018591
equalui 3018591
itou_or_0 3041664
maxdd 3184022
cmpis 3634925
negr 3671455
cmpsi 3866923
ceildivuu 3908089
Fl_center 4486494
absrnz_equal1 4520947
real_1_bit 4706399
maxuu 4815332
mod4 4932581
umuluu_or_0 5539395
umuluu_le 5803291
subsi 6117309
subri 6131423
truedivsi 6202031
affsi 6383651
mulrs 7181596
fractor 7376766
gc_NULL 7971920
cmpir 9433229
ugcdiu 10105865
cmpui 10118398
cmpiu 10118491
affectsign_safe 10738731
uabsdiviu_rem 11892741
addrs 12307138
smodss 12491042
rdivii 13099215
rdiviiz 13141931
mod8 13269082
mpabs_shallow 13428463
utor 13463562
affur 13463664
divii 14061801
subrs 16479234
dvdii 16572960
Fl_halve 18034978
modis 19638526
smodis 21176060
evalvalser 21527935
int_bit 22307661
hammingu 24048641
abscmpui 33876572
abscmpiu 33876677
mulri 38034096
mpexpo 38885417
absequaliu 39660658
absequalui 41409572
itos_or_0 43597531
Mod4 43781551
modsi 45225526
affui 45473821
Fl_div 46461354
stack_malloc 46645697
truedivii 47018981
umodi2n 49033618
sdivsi_rem 51429853
gc_bool 52019310
gc_ulong 52181472
affrr_fixlg 54655431
stack_malloc_align 55514605
absi_shallow 58939460
Fl_addmulmul_pre 60116795
mod2 61160058
minuu 69245663
remlll_pre 75542217
evalprecp 78667229
evalvalp 81623593
mpsqr 91044105
Fl_sqr 94891407
Fl_triple 95147758
addiu 98442193
addui 102092025
mod2BIL 103596004
fixlg 104153353
mpodd 115097749
icopyspec 117100183
togglesign_safe 125649078
real_1 129833238
subiu 131694756
subui 136679725
mpshift 153214853
dvmduBIL 165657497
itou 177609068
shiftr 178008982
addis 181609872
gc_double 184456201
vali 190483708
varncmp 217214747
gc_long 242318969
mpsub 251634446
utoineg 294379105
cgetineg 295236773
rtor 295289233
addsi 306792447
muliu 373529638
itos 462313792
shiftr_inplace 463838510
mulis 464505724
Fl_double 468832825
real_0_bit 479109948
addir 480578869
affsr 486183123
stor 486471681
mpadd 574393730
negi 636873815
itor 713700542
Fl_neg 716259467
umodsu 724201044
stoi 772726121
expu 775522333
lg2prec 798367837
mpmul 837632403
rcopy 903271664
affii 910078250
mpneg 916824031
subrr 1000258723
cgetg_copy 1480442927
cmpuu 1492719051
cgetr 1839148276
togglesign 1912352571
minss 2008803124
absi 2067704646
mpabs 2138494689
Fl_sqr_pre 2155882107
setabssign 2205161265
nbits2lg 2363548566
Fl_mul 2416628005
expi 2453751150
addrr 2876778242
remii 3012125547
adduu 3416086486
stackdummy 3649566625
Fl_mul_pre 4087015961
Fl_add 4384056611
leafcopy 4973852917
shift_right 5626394095
dvmdsBIL 7015364741
Fl_sub 7316712939
subii 7665782634
Fl_addmul_pre 7677452156
shift_left 7684144745
uutoi 8817905055
icopy 9058281090
maxss 9756913710
utoi 11911159251
addii 12414739418
evalexpo 13130270548
utoipos 14158221362
gc_const 15519662365
cgetipos 16322031610
cgetg 24551989854
cgeti 27157126701
new_chunk 93298804101
evallg 95287891733
set_avma 129063103268

Generated by: LCOV version 1.16