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-19 09:22:25 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 43862
sdivsi 102148
stack_calloc 110590
gc_stoi 155882
dvdui 167195
subis 170992
mod16 241354
Fl_ellj_pre 242630
truedivis 266827
mindd 270164
cmpri 282310
Mod32 311108
uutoineg 355482
Mod16 389733
cgetg_block 408348
gc_utoi 468618
dvdiu 576570
mpdiv 667710
cmpsr 796096
rdivss 839647
real2n 1067403
addri 1109299
gc_utoipos 1153847
real_0 1156776
equalis 1181772
equalsi 1181954
mpround 1216540
absrnz_equal2n 1292570
umodui 1296416
cmpss 1427033
Mod8 2073754
mpcmp 2227522
udivuu_rem 2416419
Mod2 2479234
gc_int 2574335
mulru 2765892
subir 3006688
equaliu 3018564
equalui 3018564
itou_or_0 3041679
maxdd 3182686
cmpis 3634916
negr 3670867
ceildivuu 3848578
cmpsi 3866914
Fl_center 4486488
absrnz_equal1 4519664
real_1_bit 4706228
maxuu 4815143
mod4 4932053
umuluu_or_0 5544817
umuluu_le 5803291
subri 6088403
subsi 6117295
truedivsi 6202031
affsi 6383291
mulrs 7181596
fractor 7376742
gc_NULL 7971323
cmpir 9443762
ugcdiu 10077455
cmpiu 10120381
cmpui 10120419
affectsign_safe 10737149
uabsdiviu_rem 11892741
addrs 12305010
smodss 12528257
rdivii 13100044
rdiviiz 13145943
mod8 13271813
mpabs_shallow 13428463
utor 13463319
affur 13463434
divii 14052441
subrs 16476790
dvdii 16557903
Fl_halve 18022919
modis 19638526
smodis 21176060
evalvalser 21527935
int_bit 22309747
hammingu 24048662
abscmpui 32601943
abscmpiu 32602053
mulri 38034075
mpexpo 38854654
absequaliu 39660126
absequalui 41409062
itos_or_0 43597077
Mod4 43772080
modsi 45225544
affui 45473825
Fl_div 46537607
stack_malloc 46643990
truedivii 46780470
umodi2n 49024001
sdivsi_rem 51429871
gc_bool 51998045
gc_ulong 52179544
affrr_fixlg 54650082
stack_malloc_align 55490161
absi_shallow 57659056
Fl_addmulmul_pre 60038397
mod2 61154289
minuu 69076777
remlll_pre 75530918
evalprecp 78666766
evalvalp 81623706
mpsqr 90980489
Fl_sqr 94900318
Fl_triple 95410802
addiu 95885404
addui 99535175
mod2BIL 103591964
fixlg 104148014
mpodd 115087590
icopyspec 117029696
togglesign_safe 125516110
real_1 129775586
subiu 131686221
subui 136671297
mpshift 153165418
dvmduBIL 163260830
itou 177095537
shiftr 177973308
addis 181590564
gc_double 184368119
vali 190347099
varncmp 217212726
gc_long 242066533
mpsub 251479882
utoineg 294175870
cgetineg 295033667
rtor 295272187
addsi 306776253
muliu 373488502
itos 462024218
mulis 463146929
shiftr_inplace 463819626
Fl_double 469704362
addir 479863066
real_0_bit 481032938
affsr 486033450
stor 486349140
mpadd 576015307
negi 636703069
itor 713087368
Fl_neg 716744368
umodsu 724203743
stoi 772554718
expu 775321668
lg2prec 797873964
mpmul 839092665
rcopy 902703614
affii 909194403
mpneg 916628842
subrr 1000054803
cgetg_copy 1479789867
cmpuu 1492628798
cgetr 1838341053
togglesign 1910891369
minss 2008342383
absi 2060572035
mpabs 2131388052
Fl_sqr_pre 2154230010
setabssign 2198071646
nbits2lg 2364586314
Fl_mul 2415375813
expi 2453232028
addrr 2877129631
remii 3012406078
adduu 3411243611
stackdummy 3641163338
Fl_mul_pre 4085086465
Fl_add 4388111372
leafcopy 4964057954
shift_right 5625174081
dvmdsBIL 7013023244
Fl_sub 7283442518
subii 7664246885
shift_left 7682407659
Fl_addmul_pre 7688110046
uutoi 8808003044
icopy 9054787170
maxss 9721029715
utoi 11899333010
addii 12404701424
evalexpo 13124867885
utoipos 14143448637
gc_const 15512246237
cgetipos 16302459178
cgetg 24532321011
cgeti 27124170193
new_chunk 93234115104
evallg 95204951797
set_avma 128962353366

Generated by: LCOV version 1.16