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 30764-6b81f1f3fa) Lines: 605 680 89.0 %
Date: 2026-03-26 09:27:02 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
varnmax 203
mod32 259
dvdsi 371
real_m1 455
mpcopy 665
ugcdui 2737
thuemorseu 3313
stack_calloc_align 3325
varnmin 10374
uabsdivui_rem 16693
absr 19040
addss 25067
subss 25067
subuu 25067
dvdis 33730
cmprs 40996
cgetr_block 44258
sdivsi 102148
stack_calloc 110665
gc_stoi 155906
dvdui 167195
subis 171738
Fl_ellj_pre 238060
mindd 264379
truedivis 268387
cmpri 284263
mod16 307023
Mod32 311108
uutoineg 363689
Mod16 389733
cgetg_block 426326
gc_utoi 468763
dvdiu 576278
mpdiv 665533
cmpsr 796095
rdivss 839647
real2n 1068603
addri 1106261
equalis 1151147
equalsi 1151328
gc_utoipos 1153588
real_0 1157693
mpround 1216584
umodui 1290953
absrnz_equal2n 1300264
cmpss 1392943
Mod8 2074254
mpcmp 2226371
Mod2 2370269
udivuu_rem 2418379
gc_int 2742577
mulru 2765892
subir 3004972
equalui 3021727
equaliu 3021728
itou_or_0 3147018
maxdd 3211602
cmpis 3634543
negr 3682886
cmpsi 3866543
ceildivuu 3903365
Fl_center 4486194
absrnz_equal1 4553854
real_1_bit 4714005
mod4 5140847
subri 6098808
subsi 6184517
truedivsi 6202031
umuluu_or_0 6289324
affsi 6446225
maxuu 6610603
mulrs 7181596
fractor 7379031
umuluu_le 7617880
gc_NULL 7962339
cmpir 9441651
ugcdiu 10320619
affectsign_safe 10732536
uabsdiviu_rem 11892741
addrs 12361038
smodss 12647491
cmpiu 12985378
cmpui 12985994
rdivii 13107946
rdiviiz 13148842
mpabs_shallow 13428463
divii 14067505
utor 14335000
affur 14335113
mod8 15587205
subrs 16536491
dvdii 16905729
Fl_halve 18820264
modis 19638526
int_bit 20932078
smodis 21176081
hammingu 24048742
evalvalser 24359582
abscmpiu 33833005
abscmpui 33833075
mulri 38284895
mpexpo 38877750
absequaliu 39540831
absequalui 41290826
Mod4 43860977
itos_or_0 44911456
modsi 45242073
affui 45491533
Fl_div 46826758
stack_malloc 46928650
umodi2n 49005933
sdivsi_rem 51446394
gc_ulong 52093403
truedivii 54741243
stack_malloc_align 55536718
affrr_fixlg 56109721
gc_bool 56169584
absi_shallow 57882984
mod2 61681666
Fl_addmulmul_pre 64730253
minuu 69653274
remlll_pre 76155008
evalprecp 78676579
evalvalp 81633086
mpsqr 91035833
Fl_triple 91296015
Fl_sqr 99546589
addiu 99721870
addui 103796912
fixlg 105720328
mod2BIL 106541713
mpodd 115184498
icopyspec 117798260
subiu 133396312
real_1 133647097
subui 138372305
mpshift 153579846
togglesign_safe 157294575
dvmduBIL 158910150
itou 179067900
gc_double 184220714
shiftr 187933567
vali 190834473
addis 194719011
varncmp 198759176
gc_long 242624738
mpsub 251607894
utoineg 297822065
cgetineg 298683114
rtor 303772620
addsi 319904849
muliu 376445447
Fl_double 453089928
mulis 467124261
shiftr_inplace 467410227
itos 476324022
real_0_bit 482184791
addir 483077644
affsr 501300120
stor 501688152
mpadd 572799025
negi 640859829
itor 717318147
Fl_neg 723671032
umodsu 734197692
expu 796772037
stoi 797208935
lg2prec 816294701
mpmul 837087291
rcopy 916890415
mpneg 926540548
affii 965431107
subrr 1006452467
cgetg_copy 1482398993
cmpuu 1490447100
cgetr 1876563821
togglesign 1953937574
minss 2026303582
absi 2067095196
mpabs 2138040168
setabssign 2205109079
Fl_sqr_pre 2348053267
nbits2lg 2403119262
expi 2423365013
Fl_mul 2442561317
addrr 2932603348
remii 3059375951
adduu 3450639658
stackdummy 3666804821
Fl_mul_pre 4239054160
leafcopy 5004010486
shift_right 5737411302
Fl_add 6142341603
dvmdsBIL 7153395175
Fl_sub 7437767584
Fl_addmul_pre 7677077680
subii 7719266079
shift_left 7800130480
uutoi 8947800720
icopy 9066446564
maxss 9731333578
utoi 12066956456
addii 12547209444
evalexpo 13401674550
utoipos 14283374575
gc_const 15648277186
cgetipos 16468363715
cgetg 25472088124
cgeti 27490922793
new_chunk 94957602645
evallg 96716588410
set_avma 131185802969

Generated by: LCOV version 1.16