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-21 09:22:16 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 43853
sdivsi 102150
stack_calloc 110578
gc_stoi 155884
dvdui 167195
subis 170994
mod16 241353
Fl_ellj_pre 242606
truedivis 266843
mindd 270159
cmpri 282310
Mod32 311108
uutoineg 355169
Mod16 389733
cgetg_block 408358
gc_utoi 468640
dvdiu 576573
mpdiv 667704
cmpsr 796105
rdivss 839647
real2n 1067395
addri 1109300
gc_utoipos 1153834
real_0 1156751
equalis 1181691
equalsi 1181873
mpround 1216542
absrnz_equal2n 1292523
umodui 1296416
cmpss 1427033
Mod8 2073907
mpcmp 2227500
udivuu_rem 2416419
Mod2 2479184
gc_int 2574331
mulru 2765892
subir 3006693
equaliu 3018580
equalui 3018580
itou_or_0 3041676
maxdd 3182541
cmpis 3634939
negr 3670740
ceildivuu 3846085
cmpsi 3866940
Fl_center 4486418
absrnz_equal1 4519527
real_1_bit 4706230
maxuu 4815218
mod4 4932443
umuluu_or_0 5526211
umuluu_le 5803291
subri 6116466
subsi 6117332
truedivsi 6202031
affsi 6383218
mulrs 7181596
fractor 7376750
gc_NULL 7969241
cmpir 9426555
ugcdiu 10077273
cmpiu 10118710
cmpui 10118722
affectsign_safe 10737495
uabsdiviu_rem 11892741
addrs 12304722
smodss 12483721
rdivii 13100965
rdiviiz 13146642
mod8 13270359
mpabs_shallow 13428463
utor 13463340
affur 13463448
divii 14056133
subrs 16476411
dvdii 16560080
Fl_halve 18021863
modis 19638526
smodis 21176060
evalvalser 21527935
int_bit 22310828
hammingu 24048658
abscmpui 32298912
abscmpiu 32299006
mulri 38033943
mpexpo 38856839
absequaliu 39660531
absequalui 41409463
itos_or_0 43597423
Mod4 43774491
modsi 45225540
affui 45473824
Fl_div 46550417
stack_malloc 46643754
truedivii 46790143
umodi2n 49026829
sdivsi_rem 51429867
gc_bool 52000199
gc_ulong 52154794
affrr_fixlg 54649519
stack_malloc_align 55489881
absi_shallow 57357325
Fl_addmulmul_pre 60037510
mod2 61154462
minuu 69089139
remlll_pre 75517564
evalprecp 78666102
evalvalp 81623298
mpsqr 90972380
Fl_sqr 94871067
Fl_triple 95181208
addiu 95274256
addui 98924048
mod2BIL 103592962
fixlg 104147372
mpodd 115087842
icopyspec 117029921
togglesign_safe 125498305
real_1 129795402
subiu 131686778
subui 136671902
mpshift 153174083
dvmduBIL 165738400
itou 177093498
shiftr 177975155
addis 181594910
gc_double 184398365
vali 190347466
varncmp 217212889
gc_long 242070616
mpsub 251470441
utoineg 294172915
cgetineg 295030182
rtor 295272219
addsi 306780674
muliu 373493156
itos 462041278
mulis 463148619
shiftr_inplace 463788055
Fl_double 469034352
real_0_bit 478876390
addir 479875402
affsr 486047760
stor 486345787
mpadd 574086501
negi 636737032
itor 713175319
Fl_neg 716667475
umodsu 724159257
stoi 772583787
expu 775316764
lg2prec 797912508
mpmul 837137476
rcopy 902724593
affii 908998704
mpneg 916669755
subrr 1000054767
cgetg_copy 1479804142
cmpuu 1492664859
cgetr 1838476562
togglesign 1910987128
minss 2008556548
absi 2060512628
mpabs 2131300233
Fl_sqr_pre 2153578919
setabssign 2197981940
nbits2lg 2362826370
Fl_mul 2414473173
expi 2453259400
addrr 2875387255
remii 3012395574
adduu 3410719196
stackdummy 3639995380
Fl_mul_pre 4089333896
Fl_add 4384601757
leafcopy 4964860917
shift_right 5625421755
dvmdsBIL 7013346170
Fl_sub 7284463114
subii 7664346948
shift_left 7682485669
Fl_addmul_pre 7684870657
uutoi 8807054193
icopy 9055208373
maxss 9723256921
utoi 11898073873
addii 12405853323
evalexpo 13123686304
utoipos 14141838871
gc_const 15513222542
cgetipos 16300708395
cgetg 24525904724
cgeti 27121741669
new_chunk 93230275097
evallg 95194828364
set_avma 128960084261

Generated by: LCOV version 1.16