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 30482-15ec328664) Lines: 605 680 89.0 %
Date: 2025-09-06 09:24:15 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 33912
cmprs 40996
cgetr_block 43591
sdivsi 102150
stack_calloc 110155
gc_stoi 155883
dvdui 167195
subis 170994
mod16 236594
Fl_ellj_pre 242622
truedivis 266821
mindd 270153
cmpri 282310
Mod32 311108
uutoineg 355680
Mod16 389733
cgetg_block 393635
gc_utoi 468587
dvdiu 576565
mpdiv 667710
cmpsr 795900
rdivss 839647
real2n 1067398
addri 1109287
gc_utoipos 1153903
real_0 1156016
equalis 1181582
equalsi 1181765
mpround 1216532
absrnz_equal2n 1288786
umodui 1296416
cmpss 1427033
Mod8 2070208
mpcmp 2227513
udivuu_rem 2416391
Mod2 2479841
gc_int 2574347
mulru 2765822
equaliu 2995653
equalui 2995653
subir 3006695
itou_or_0 3054259
maxdd 3163744
cmpis 3633563
negr 3670178
ceildivuu 3846880
cmpsi 3865534
Fl_center 4485536
absrnz_equal1 4515842
mod4 4700810
real_1_bit 4705713
maxuu 4805126
umuluu_or_0 5510509
umuluu_le 5800680
subsi 6112221
subri 6126269
truedivsi 6202031
affsi 6383122
mulrs 7181596
fractor 7376314
gc_NULL 7968216
cmpir 9426726
ugcdiu 10085813
cmpui 10116009
cmpiu 10116252
affectsign_safe 10737280
uabsdiviu_rem 11892741
addrs 12305006
smodss 12447438
rdivii 13100843
rdiviiz 13144829
mod8 13271262
mpabs_shallow 13428463
utor 13460181
affur 13460289
divii 14061869
subrs 16476608
dvdii 16481227
Fl_halve 18016315
modis 19638518
smodis 21176255
evalvalser 21443044
int_bit 22268888
hammingu 24045785
abscmpui 32378731
abscmpiu 32378772
mulri 38034297
mpexpo 38857125
absequaliu 39649968
absequalui 41398869
itos_or_0 43581334
Mod4 44350153
modsi 45225536
affui 45473822
Fl_div 46472856
stack_malloc 46631298
truedivii 46797065
umodi2n 49601244
sdivsi_rem 51429863
gc_bool 51917132
gc_ulong 52148708
stack_malloc_align 55489922
affrr_fixlg 55796058
absi_shallow 57430370
Fl_addmulmul_pre 60055419
mod2 61146658
minuu 69134928
remlll_pre 75532681
evalprecp 78664596
evalvalp 81621440
mpsqr 90973949
Fl_sqr 94838849
addiu 95145194
Fl_triple 95567313
addui 98794530
mod2BIL 103330902
fixlg 105291352
mpodd 115076941
icopyspec 117008710
togglesign_safe 125499912
real_1 131220563
subiu 131648122
subui 136341895
mpshift 153212227
dvmduBIL 165694265
itou 177064063
shiftr 180842813
addis 181682774
gc_double 184395683
vali 190292763
varncmp 217201421
gc_long 241794896
mpsub 251522825
utoineg 294206055
cgetineg 295063836
rtor 300456626
addsi 306865122
muliu 372552599
itos 461702228
mulis 463125583
Fl_double 474101055
real_0_bit 478230262
shiftr_inplace 478376165
addir 479724770
affsr 495301297
stor 495611518
mpadd 574082248
negi 637399626
itor 713170250
Fl_neg 716415608
umodsu 724176824
stoi 772917211
expu 786957634
lg2prec 807154404
mpmul 837153581
rcopy 905603807
affii 909156064
mpneg 917804551
subrr 1001012165
cgetg_copy 1479693143
cmpuu 1492924092
cgetr 1856910564
togglesign 1914543181
minss 2008915215
absi 2060438439
mpabs 2131677581
Fl_sqr_pre 2161177789
setabssign 2198364435
nbits2lg 2380591395
Fl_mul 2413592747
expi 2454047359
addrr 2881891204
remii 3010890350
adduu 3410488598
stackdummy 3641373927
Fl_mul_pre 4081715347
Fl_add 4356614745
leafcopy 4969016499
shift_right 5671810103
dvmdsBIL 7089549007
Fl_sub 7287003209
Fl_addmul_pre 7648710104
subii 7664165345
shift_left 7753613786
uutoi 8808395097
icopy 9056402737
maxss 9722737991
utoi 11899598082
addii 12407641081
evalexpo 13259394854
utoipos 14147216760
gc_const 15512356333
cgetipos 16314002210
cgetg 24653281953
cgeti 27124648697
new_chunk 93424262440
evallg 95443380935
set_avma 129257657282

Generated by: LCOV version 1.16