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 30571-c0dfe82732) Lines: 605 680 89.0 %
Date: 2025-12-06 09:22:10 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 43854
sdivsi 102150
stack_calloc 110596
gc_stoi 155886
dvdui 167195
subis 170994
mod16 241356
Fl_ellj_pre 242640
truedivis 267022
mindd 270163
cmpri 282310
Mod32 311108
uutoineg 355573
Mod16 389733
cgetg_block 408514
gc_utoi 468679
dvdiu 576584
mpdiv 667743
cmpsr 796091
rdivss 839647
real2n 1067471
addri 1109469
gc_utoipos 1153891
real_0 1156747
equalis 1181975
equalsi 1182157
mpround 1216585
absrnz_equal2n 1292738
umodui 1296416
cmpss 1427033
Mod8 2073991
mpcmp 2227703
udivuu_rem 2416426
Mod2 2479276
gc_int 2574330
mulru 2765892
subir 3006693
equalui 3018592
equaliu 3018593
itou_or_0 3041678
maxdd 3183870
cmpis 3634968
negr 3671503
cmpsi 3866968
ceildivuu 3906737
Fl_center 4486392
absrnz_equal1 4520797
real_1_bit 4706334
maxuu 4815295
mod4 4932890
umuluu_or_0 5504762
umuluu_le 5803291
subri 6115023
subsi 6117327
truedivsi 6202031
affsi 6383610
mulrs 7181596
fractor 7376765
gc_NULL 7971494
cmpir 9429622
ugcdiu 10105459
cmpui 10119514
cmpiu 10119602
affectsign_safe 10738327
uabsdiviu_rem 11892741
addrs 12306866
smodss 12510962
rdivii 13097984
rdiviiz 13141522
mod8 13270905
mpabs_shallow 13428463
utor 13463503
affur 13463598
divii 14058554
subrs 16478842
dvdii 16573700
Fl_halve 18026778
modis 19638526
smodis 21176060
evalvalser 21527935
int_bit 22321308
hammingu 24048717
abscmpui 32387939
abscmpiu 32388053
mulri 38034018
mpexpo 38880584
absequaliu 39661220
absequalui 41410128
itos_or_0 43596715
Mod4 43781104
modsi 45225511
affui 45473825
Fl_div 46433612
stack_malloc 46645231
truedivii 47017597
umodi2n 49033587
sdivsi_rem 51429838
gc_bool 52020566
gc_ulong 52162024
affrr_fixlg 54654896
stack_malloc_align 55507946
absi_shallow 57451326
Fl_addmulmul_pre 60117879
mod2 61160888
minuu 69283297
remlll_pre 75488986
evalprecp 78667735
evalvalp 81624072
mpsqr 91025872
Fl_sqr 94872669
Fl_triple 95070220
addiu 95459463
addui 99109235
mod2BIL 103598900
fixlg 104152779
mpodd 115099337
icopyspec 117100064
togglesign_safe 125661776
real_1 129817910
subiu 131694520
subui 136679587
mpshift 153210094
dvmduBIL 165727215
itou 177608725
shiftr 178002622
addis 181630788
gc_double 184444462
vali 190483551
varncmp 217214627
gc_long 242318017
mpsub 251537094
utoineg 294388136
cgetineg 295245663
rtor 295281425
addsi 306815480
muliu 373563862
itos 462307883
shiftr_inplace 463819636
mulis 464525203
Fl_double 468644451
real_0_bit 478854505
addir 480558729
affsr 486164711
stor 486452851
mpadd 574090994
negi 636872041
itor 713644839
Fl_neg 716247059
umodsu 724172625
stoi 772811508
expu 775494491
lg2prec 798351973
mpmul 837206908
rcopy 903223393
affii 910188834
mpneg 916811477
subrr 1000174254
cgetg_copy 1480409513
cmpuu 1492737168
cgetr 1839036107
togglesign 1912368053
minss 2008974412
absi 2067561405
mpabs 2138334811
Fl_sqr_pre 2155172486
setabssign 2205007255
nbits2lg 2363334165
Fl_mul 2413372719
expi 2453900181
addrr 2876460116
remii 3012824033
adduu 3413376686
stackdummy 3640129543
Fl_mul_pre 4079870499
Fl_add 4383083060
leafcopy 4973582398
shift_right 5625792133
dvmdsBIL 7015316947
Fl_sub 7282087029
subii 7665852090
Fl_addmul_pre 7669973783
shift_left 7683776480
uutoi 8815297568
icopy 9058662005
maxss 9721531567
utoi 11906004446
addii 12417865977
evalexpo 13129383285
utoipos 14152968344
gc_const 15519818918
cgetipos 16317008513
cgetg 24530118032
cgeti 27152036446
new_chunk 93265375590
evallg 95248738550
set_avma 129017555423

Generated by: LCOV version 1.16