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 30569-8181146aa1) Lines: 605 680 89.0 %
Date: 2025-12-04 09:22:12 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 43861
sdivsi 102149
stack_calloc 110582
gc_stoi 155884
dvdui 167195
subis 170993
mod16 241356
Fl_ellj_pre 242630
truedivis 267013
mindd 270167
cmpri 282310
Mod32 311108
uutoineg 355099
Mod16 389733
cgetg_block 408513
gc_utoi 468555
dvdiu 576581
mpdiv 667754
cmpsr 796102
rdivss 839647
real2n 1067481
addri 1109418
gc_utoipos 1153897
real_0 1156776
equalis 1182043
equalsi 1182225
mpround 1216594
absrnz_equal2n 1292748
umodui 1296416
cmpss 1427033
Mod8 2073779
mpcmp 2227735
udivuu_rem 2416426
Mod2 2479159
gc_int 2574343
mulru 2765892
subir 3006717
equalui 3018588
equaliu 3018589
itou_or_0 3041674
maxdd 3183728
cmpis 3634933
negr 3671459
cmpsi 3866933
ceildivuu 3907498
Fl_center 4486496
absrnz_equal1 4520860
real_1_bit 4706343
maxuu 4815406
mod4 4932618
umuluu_or_0 5505720
umuluu_le 5803291
subri 6089315
subsi 6117401
truedivsi 6202031
affsi 6383569
mulrs 7181596
fractor 7376765
gc_NULL 7972448
cmpir 9449998
ugcdiu 10105944
cmpui 10121281
cmpiu 10121334
affectsign_safe 10737050
uabsdiviu_rem 11892741
addrs 12307120
smodss 12487010
rdivii 13098249
rdiviiz 13141665
mod8 13273207
mpabs_shallow 13428463
utor 13463501
affur 13463612
divii 14053523
subrs 16479173
dvdii 16569621
Fl_halve 18025956
modis 19638526
smodis 21176060
evalvalser 21527935
int_bit 22305546
hammingu 24048681
abscmpui 32377724
abscmpiu 32377860
mulri 38033992
mpexpo 38881644
absequaliu 39660543
absequalui 41409457
itos_or_0 43597280
Mod4 43778661
modsi 45225495
affui 45473825
Fl_div 46453862
stack_malloc 46645689
truedivii 47016218
umodi2n 49030695
sdivsi_rem 51429824
gc_bool 52019477
gc_ulong 52164947
affrr_fixlg 54655352
stack_malloc_align 55510979
absi_shallow 57440211
Fl_addmulmul_pre 60102388
mod2 61159953
minuu 69204883
remlll_pre 75500281
evalprecp 78666858
evalvalp 81623282
mpsqr 91044581
Fl_sqr 94880288
Fl_triple 95114426
addiu 95431163
addui 99080957
mod2BIL 103599737
fixlg 104153310
mpodd 115097732
icopyspec 117099834
togglesign_safe 125695924
real_1 129801537
subiu 131692729
subui 136677748
mpshift 153212424
dvmduBIL 165621859
itou 177608910
shiftr 178002877
addis 181595652
gc_double 184405577
vali 190483966
varncmp 217214782
gc_long 242317197
mpsub 251576839
utoineg 294398627
cgetineg 295256146
rtor 295282579
addsi 306778551
muliu 373512501
itos 462305551
shiftr_inplace 463843309
mulis 464534816
Fl_double 468857375
addir 480549961
real_0_bit 481180129
affsr 486170790
stor 486462711
mpadd 576165367
negi 636915813
itor 713573887
Fl_neg 716252148
umodsu 724193793
stoi 772648953
expu 775510408
lg2prec 798326944
mpmul 839328687
rcopy 903215919
affii 910318231
mpneg 916849699
subrr 1000182746
cgetg_copy 1480432412
cmpuu 1492712611
cgetr 1838948086
togglesign 1912452608
minss 2008699856
absi 2067664543
mpabs 2138475738
Fl_sqr_pre 2155090229
setabssign 2205146083
nbits2lg 2364938354
Fl_mul 2413156201
expi 2453699838
addrr 2878508769
remii 3011823399
adduu 3413200196
stackdummy 3640073944
Fl_mul_pre 4080332358
Fl_add 4384420628
leafcopy 4973768931
shift_right 5625821127
dvmdsBIL 7015164752
Fl_sub 7285311197
subii 7665158766
Fl_addmul_pre 7674531731
shift_left 7683892533
uutoi 8814911120
icopy 9056964776
maxss 9725429349
utoi 11905719060
addii 12412837272
evalexpo 13131526879
utoipos 14152945312
gc_const 15518314618
cgetipos 16316510950
cgetg 24534117857
cgeti 27144985142
new_chunk 93261474381
evallg 95246332810
set_avma 129009880917

Generated by: LCOV version 1.16