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-14 09:22:17 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 102148
stack_calloc 110598
gc_stoi 155882
dvdui 167195
subis 170992
mod16 241356
Fl_ellj_pre 242638
truedivis 267026
mindd 270168
cmpri 282310
Mod32 311108
uutoineg 355522
Mod16 389733
cgetg_block 408499
gc_utoi 468553
dvdiu 576585
mpdiv 667745
cmpsr 796102
rdivss 839647
real2n 1067471
addri 1109437
gc_utoipos 1153883
real_0 1156758
equalis 1182095
equalsi 1182277
mpround 1216585
absrnz_equal2n 1292833
umodui 1296416
cmpss 1427033
Mod8 2073818
mpcmp 2227727
udivuu_rem 2416426
Mod2 2479108
gc_int 2574333
mulru 2765892
subir 3006744
equaliu 3018585
equalui 3018586
itou_or_0 3041671
maxdd 3183939
cmpis 3634990
negr 3671523
cmpsi 3866996
ceildivuu 3909496
Fl_center 4486492
absrnz_equal1 4520928
real_1_bit 4706199
maxuu 4815423
mod4 4932759
umuluu_or_0 5548002
umuluu_le 5803291
subsi 6117321
subri 6133955
truedivsi 6202031
affsi 6383487
mulrs 7181596
fractor 7376768
gc_NULL 7972306
cmpir 9437259
ugcdiu 10105108
cmpui 10119896
cmpiu 10119970
affectsign_safe 10738280
uabsdiviu_rem 11892741
addrs 12307395
smodss 12552475
rdivii 13098676
rdiviiz 13140632
mod8 13271965
mpabs_shallow 13428463
utor 13463478
affur 13463589
divii 14065281
subrs 16479367
dvdii 16559152
Fl_halve 18039283
modis 19638526
smodis 21176060
evalvalser 21527935
int_bit 22306991
hammingu 24048603
abscmpui 33067337
abscmpiu 33067447
mulri 38034071
mpexpo 38886663
absequaliu 39661111
absequalui 41410041
itos_or_0 43596996
Mod4 43780617
modsi 45225499
affui 45473825
Fl_div 46465925
stack_malloc 46645740
truedivii 47023690
umodi2n 49032748
sdivsi_rem 51429826
gc_bool 52009099
gc_ulong 52175618
affrr_fixlg 54655989
stack_malloc_align 55514886
absi_shallow 58129645
Fl_addmulmul_pre 60117194
mod2 61159527
minuu 69322232
remlll_pre 75623843
evalprecp 78668339
evalvalp 81624665
mpsqr 91047940
Fl_sqr 94900395
Fl_triple 95239101
addiu 96824533
addui 100474344
mod2BIL 103600222
fixlg 104153856
mpodd 115096956
icopyspec 117100605
togglesign_safe 125670740
real_1 129832691
subiu 131695821
subui 136680800
mpshift 153217259
dvmduBIL 165649091
itou 177609410
shiftr 178011147
addis 181600888
gc_double 184448464
vali 190484247
varncmp 217214538
gc_long 242319648
mpsub 251610242
utoineg 294390999
cgetineg 295248401
rtor 295283427
addsi 306783676
muliu 373538231
itos 462319956
shiftr_inplace 463912423
mulis 464529878
Fl_double 469111946
real_0_bit 479395497
addir 480580189
affsr 486209031
stor 486493846
mpadd 574614346
negi 636928111
itor 713746917
Fl_neg 716259870
umodsu 724198020
stoi 772887836
expu 775536494
lg2prec 798444972
mpmul 837809437
rcopy 903275870
affii 910146328
mpneg 916878725
subrr 1000229449
cgetg_copy 1480449543
cmpuu 1492737398
cgetr 1839219324
togglesign 1912496048
minss 2009103020
absi 2067767047
mpabs 2138564427
Fl_sqr_pre 2157008675
setabssign 2205233612
nbits2lg 2363792960
Fl_mul 2415208205
expi 2453709482
addrr 2877153703
remii 3012785627
adduu 3414822490
stackdummy 3645202368
Fl_mul_pre 4085340874
Fl_add 4388200509
leafcopy 4974023896
shift_right 5626770560
dvmdsBIL 7015963088
Fl_sub 7299857023
subii 7665700989
Fl_addmul_pre 7674317402
shift_left 7684759453
uutoi 8818542375
icopy 9058643147
maxss 9740089800
utoi 11910333404
addii 12415880771
evalexpo 13131648071
utoipos 14157494916
gc_const 15519355531
cgetipos 16320729805
cgetg 24545101543
cgeti 27151826009
new_chunk 93289546236
evallg 95272965564
set_avma 129053931797

Generated by: LCOV version 1.16