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 30365-beea1ff998) Lines: 605 680 89.0 %
Date: 2025-07-02 09:21:24 Functions: 214 238 89.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl_add 4348140475
Fl_addmul_pre 7603669123
Fl_addmulmul_pre 59609383
Fl_center 4029972
Fl_div 46557271
Fl_double 476146621
Fl_ellj_pre 242788
Fl_halve 18051264
Fl_mul 2387325537
Fl_mul_pre 4032500414
Fl_neg 711829808
Fl_sqr 94881854
Fl_sqr_pre 2158943338
Fl_sub 7303970692
Fl_triple 96453527
Mod16 277481
Mod2 2024379
Mod32 199255
Mod4 44350330
Mod64 0
Mod8 2070299
abscmpiu 32896549
abscmpui 32896452
absequaliu 39649825
absequalui 41398725
absi 2065984859
absi_shallow 59449888
absr 140
absrnz_equal1 4515408
absrnz_equal2n 1288901
addii 12374552268
addir 478865365
addis 181275650
addiu 98698193
addri 1109283
addrr 2877348249
addrs 12353864
addsi 306459083
addss 25067
addui 102202482
adduu 3413780280
affectsign 0
affectsign_safe 10737201
affii 908733682
affrr_fixlg 55888103
affsi 6396257
affsr 495675840
affui 45473650
affur 13453505
ceildivuu 3847141
cgetg 24544102068
cgetg_block 393410
cgetg_copy 1471001120
cgeti 27242733198
cgetineg 268214631
cgetipos 16419484942
cgetr 1857159144
cgetr_block 43489
cmpir 9423767
cmpis 3633389
cmpiu 9658331
cmpri 282261
cmprs 40996
cmpsi 3865340
cmpsr 824652
cmpss 1432792
cmpui 9658234
cmpuu 1440501365
divii 14057021
divsi_rem 0
divss 0
divss_rem 0
dvdii 16479761
dvdiiz 0
dvdis 33912
dvdisz 0
dvdiu 576571
dvdiuz 0
dvdsi 371
dvdui 167195
dvmdis 0
dvmdsBIL 7074166748
dvmdsi 0
dvmdss 0
dvmduBIL 165623216
equalis 1174434
equaliu 2995217
equalsi 1174616
equalui 2995217
evalexpo 13255980362
evallg 95420947307
evalprecp 78668513
evalvalp 81625009
evalvalser 21443016
expi 2455452276
expu 784187813
fixlg 103885848
fractor 7375261
gc_NULL 7975778
gc_bool 51922535
gc_const 15505710902
gc_double 182200108
gc_int 2574153
gc_long 239247077
gc_stoi 155881
gc_ulong 37204569
gc_utoi 468564
gc_utoipos 1153890
get_avma 0
hammingu 24045266
icopy 9094377176
icopyspec 116491193
int_bit 22302088
itor 712676779
itos 459021771
itos_or_0 24090328
itou 176158328
itou_or_0 2996103
leafcopy 4965482343
lg2prec 807016363
maxdd 3162761
maxss 9602037655
maxuu 4805176
mindd 268633
minss 2011908558
minuu 68001174
mod16 236580
mod2 61083412
mod2BIL 102142561
mod32 259
mod4 4684303
mod64 0
mod8 13199495
modis 19602559
modsi 45223277
modss 0
mpabs 2137196161
mpabs_shallow 13428463
mpadd 573883518
mpceil 0
mpcmp 2227465
mpcopy 708
mpdiv 667705
mpexpo 38845287
mpfloor 0
mpmul 836885951
mpneg 922028657
mpodd 114972125
mpround 1216531
mpshift 153162829
mpsqr 90939372
mpsub 251468190
mptrunc 49
mulis 464031010
muliu 372517440
mulri 38041464
mulrs 7181596
mulru 2765822
nbits2lg 2381215373
negi 641636685
negr 3692490
new_chunk 93442449379
rcopy 904144450
rdivii 13095830
rdiviiz 13138739
rdivis 0
rdivsi 0
rdivss 839647
real2n 1060984
real_0 1155942
real_0_bit 478453012
real_1 131577487
real_1_bit 4700645
real_m1 455
real_m2n 126
remii 3013884860
remis 0
remlll_pre 75460458
remsi 0
remss 0
rtor 300375642
sdivsi 102148
sdivsi_rem 51427604
sdivss_rem 0
set_avma 129100453583
setabssign 2203506283
shift_left 7746262084
shift_right 5661750918
shiftl 0
shiftlr 0
shiftr 180384116
shiftr_inplace 478456399
smodis 21140226
smodss 12556577
stack_calloc 110037
stack_calloc_align 3300
stack_malloc 46484873
stack_malloc_align 55474990
stackdummy 3636019580
stoi 745199729
stor 495964957
subii 7649997456
subir 3006046
subis 170993
subiu 130238781
subri 6126277
subrr 1000059986
subrs 16512398
subsi 6105050
subss 25067
subui 134477651
subuu 25067
thuemorseu 2851
togglesign 1927084933
togglesign_safe 125050645
truedivii 46771416
truedivis 266821
truedivsi 6202031
uabsdiviu_rem 11892741
uabsdivui_rem 19089
udivuu_rem 159818229
ugcdiu 9986994
ugcdui 2737
umodi2n 48921989
umodsu 724091222
umodui 1296416
umuluu_le 5800680
umuluu_or_0 5514036
utoi 11880642533
utoineg 267357181
utoipos 14237421466
utor 13453396
uutoi 8819138773
uutoineg 355645
vali 187917700
varncmp 217197625
varnmax 203
varnmin 15547

Generated by: LCOV version 1.16