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 30572-91e0396466) Lines: 605 680 89.0 %
Date: 2025-12-14 09:22:17 Functions: 214 238 89.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl_add 4388200509
Fl_addmul_pre 7674317402
Fl_addmulmul_pre 60117194
Fl_center 4486492
Fl_div 46465925
Fl_double 469111946
Fl_ellj_pre 242638
Fl_halve 18039283
Fl_mul 2415208205
Fl_mul_pre 4085340874
Fl_neg 716259870
Fl_sqr 94900395
Fl_sqr_pre 2157008675
Fl_sub 7299857023
Fl_triple 95239101
Mod16 389733
Mod2 2479108
Mod32 311108
Mod4 43780617
Mod64 0
Mod8 2073818
abscmpiu 33067447
abscmpui 33067337
absequaliu 39661111
absequalui 41410041
absi 2067767047
absi_shallow 58129645
absr 140
absrnz_equal1 4520928
absrnz_equal2n 1292833
addii 12415880771
addir 480580189
addis 181600888
addiu 96824533
addri 1109437
addrr 2877153703
addrs 12307395
addsi 306783676
addss 25067
addui 100474344
adduu 3414822490
affectsign 0
affectsign_safe 10738280
affii 910146328
affrr_fixlg 54655989
affsi 6383487
affsr 486209031
affui 45473825
affur 13463589
ceildivuu 3909496
cgetg 24545101543
cgetg_block 408499
cgetg_copy 1480449543
cgeti 27151826009
cgetineg 295248401
cgetipos 16320729805
cgetr 1839219324
cgetr_block 43875
cmpir 9437259
cmpis 3634990
cmpiu 10119970
cmpri 282310
cmprs 40996
cmpsi 3866996
cmpsr 796102
cmpss 1427033
cmpui 10119896
cmpuu 1492737398
divii 14065281
divsi_rem 0
divss 0
divss_rem 0
dvdii 16559152
dvdiiz 0
dvdis 33709
dvdisz 0
dvdiu 576585
dvdiuz 0
dvdsi 371
dvdui 167195
dvmdis 0
dvmdsBIL 7015963088
dvmdsi 0
dvmdss 0
dvmduBIL 165649091
equalis 1182095
equaliu 3018585
equalsi 1182277
equalui 3018586
evalexpo 13131648071
evallg 95272965564
evalprecp 78668339
evalvalp 81624665
evalvalser 21527935
expi 2453709482
expu 775536494
fixlg 104153856
fractor 7376768
gc_NULL 7972306
gc_bool 52009099
gc_const 15519355531
gc_double 184448464
gc_int 2574333
gc_long 242319648
gc_stoi 155882
gc_ulong 52175618
gc_utoi 468553
gc_utoipos 1153883
get_avma 0
hammingu 24048603
icopy 9058643147
icopyspec 117100605
int_bit 22306991
itor 713746917
itos 462319956
itos_or_0 43596996
itou 177609410
itou_or_0 3041671
leafcopy 4974023896
lg2prec 798444972
maxdd 3183939
maxss 9740089800
maxuu 4815423
mindd 270168
minss 2009103020
minuu 69322232
mod16 241356
mod2 61159527
mod2BIL 103600222
mod32 259
mod4 4932759
mod64 0
mod8 13271965
modis 19638526
modsi 45225499
modss 0
mpabs 2138564427
mpabs_shallow 13428463
mpadd 574614346
mpceil 0
mpcmp 2227727
mpcopy 665
mpdiv 667745
mpexpo 38886663
mpfloor 0
mpmul 837809437
mpneg 916878725
mpodd 115096956
mpround 1216585
mpshift 153217259
mpsqr 91047940
mpsub 251610242
mptrunc 49
mulis 464529878
muliu 373538231
mulri 38034071
mulrs 7181596
mulru 2765892
nbits2lg 2363792960
negi 636928111
negr 3671523
new_chunk 93289546236
rcopy 903275870
rdivii 13098676
rdiviiz 13140632
rdivis 0
rdivsi 0
rdivss 839647
real2n 1067471
real_0 1156758
real_0_bit 479395497
real_1 129832691
real_1_bit 4706199
real_m1 455
real_m2n 126
remii 3012785627
remis 0
remlll_pre 75623843
remsi 0
remss 0
rtor 295283427
sdivsi 102148
sdivsi_rem 51429826
sdivss_rem 0
set_avma 129053931797
setabssign 2205233612
shift_left 7684759453
shift_right 5626770560
shiftl 0
shiftlr 0
shiftr 178011147
shiftr_inplace 463912423
smodis 21176060
smodss 12552475
stack_calloc 110598
stack_calloc_align 3307
stack_malloc 46645740
stack_malloc_align 55514886
stackdummy 3645202368
stoi 772887836
stor 486493846
subii 7665700989
subir 3006744
subis 170992
subiu 131695821
subri 6133955
subrr 1000229449
subrs 16479367
subsi 6117321
subss 25067
subui 136680800
subuu 25067
thuemorseu 2851
togglesign 1912496048
togglesign_safe 125670740
truedivii 47023690
truedivis 267026
truedivsi 6202031
uabsdiviu_rem 11892741
uabsdivui_rem 16693
udivuu_rem 2416426
ugcdiu 10105108
ugcdui 2737
umodi2n 49032748
umodsu 724198020
umodui 1296416
umuluu_le 5803291
umuluu_or_0 5548002
utoi 11910333404
utoineg 294390999
utoipos 14157494916
utor 13463478
uutoi 8818542375
uutoineg 355522
vali 190484247
varncmp 217214538
varnmax 203
varnmin 15547

Generated by: LCOV version 1.16