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 30550-07450a7a86) Lines: 605 680 89.0 %
Date: 2025-11-17 09:22:41 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 43857
sdivsi 102150
stack_calloc 110580
gc_stoi 155885
dvdui 167195
subis 170994
mod16 241356
Fl_ellj_pre 242623
truedivis 266824
mindd 270162
cmpri 282310
Mod32 311108
uutoineg 355571
Mod16 389733
cgetg_block 408343
gc_utoi 468529
dvdiu 576566
mpdiv 667713
cmpsr 796101
rdivss 839647
real2n 1067405
addri 1109329
gc_utoipos 1153841
real_0 1156754
equalis 1181622
equalsi 1181804
mpround 1216544
absrnz_equal2n 1292517
umodui 1296416
cmpss 1427033
Mod8 2073863
mpcmp 2227471
udivuu_rem 2416419
Mod2 2479295
gc_int 2574311
mulru 2765892
subir 3006700
equaliu 3018562
equalui 3018562
itou_or_0 3041677
maxdd 3182663
cmpis 3634936
negr 3670995
ceildivuu 3849090
cmpsi 3866935
Fl_center 4486496
absrnz_equal1 4519503
real_1_bit 4706316
maxuu 4815226
mod4 4932390
umuluu_or_0 5515773
umuluu_le 5803291
subri 6096018
subsi 6117435
truedivsi 6202031
affsi 6383447
mulrs 7181596
fractor 7376749
gc_NULL 7970783
cmpir 9442054
ugcdiu 10077485
cmpiu 10120033
cmpui 10120074
affectsign_safe 10737196
uabsdiviu_rem 11892741
addrs 12304731
smodss 12510964
rdivii 13100619
rdiviiz 13145928
mod8 13271144
mpabs_shallow 13428463
utor 13463357
affur 13463472
divii 14056876
subrs 16476481
dvdii 16555281
Fl_halve 18034659
modis 19638526
smodis 21176060
evalvalser 21527935
int_bit 22296019
hammingu 24048618
abscmpui 32884120
abscmpiu 32884216
mulri 38033950
mpexpo 38853972
absequaliu 39660481
absequalui 41409413
itos_or_0 43597383
Mod4 43774495
modsi 45225484
affui 45473825
Fl_div 46542092
stack_malloc 46643623
truedivii 46772585
umodi2n 49027006
sdivsi_rem 51429811
gc_bool 51995905
gc_ulong 52184086
affrr_fixlg 54650001
stack_malloc_align 55488116
absi_shallow 57940930
Fl_addmulmul_pre 60048927
mod2 61154154
minuu 69097037
remlll_pre 75576989
evalprecp 78665776
evalvalp 81622861
mpsqr 90979657
Fl_sqr 94906272
Fl_triple 95312019
addiu 96452007
addui 100101833
mod2BIL 103591206
fixlg 104147884
mpodd 115087748
icopyspec 117029679
togglesign_safe 125498916
real_1 129780813
subiu 131684551
subui 136669482
mpshift 153183390
dvmduBIL 165756891
itou 177093725
shiftr 177974143
addis 181564721
gc_double 184383250
vali 190345827
varncmp 217212697
gc_long 242069617
mpsub 251511579
utoineg 294171403
cgetineg 295028985
rtor 295274475
addsi 306749827
muliu 373393785
itos 462011990
mulis 463143950
shiftr_inplace 463846961
Fl_double 469379424
addir 479865890
real_0_bit 481019538
affsr 486053736
stor 486355752
mpadd 576042366
negi 636702556
itor 713091352
Fl_neg 716598824
umodsu 724201972
stoi 772602061
expu 775316333
lg2prec 797862111
mpmul 839156031
rcopy 902714778
affii 909221488
mpneg 916636274
subrr 1000120318
cgetg_copy 1479802986
cmpuu 1492623542
cgetr 1838386462
togglesign 1910886751
minss 2008545910
absi 2060542871
mpabs 2131355490
Fl_sqr_pre 2155080008
setabssign 2198036618
nbits2lg 2364739927
Fl_mul 2414688823
expi 2453302075
addrr 2877173067
remii 3011981867
adduu 3412139749
stackdummy 3643791791
Fl_mul_pre 4083973226
Fl_add 4381688068
leafcopy 4964877437
shift_right 5625441602
dvmdsBIL 7013333512
Fl_sub 7293094301
subii 7664048766
Fl_addmul_pre 7676457637
shift_left 7682557014
uutoi 8808877025
icopy 9055430675
maxss 9731272260
utoi 11901110735
addii 12406882958
evalexpo 13125951913
utoipos 14144932499
gc_const 15513660365
cgetipos 16303849303
cgetg 24536065010
cgeti 27125388575
new_chunk 93237040311
evallg 95212707795
set_avma 128969583592

Generated by: LCOV version 1.16