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 30571-c0dfe82732) Lines: 605 680 89.0 %
Date: 2025-12-09 09:22:05 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 102149
stack_calloc 110588
gc_stoi 155885
dvdui 167195
subis 170994
mod16 241356
Fl_ellj_pre 242612
truedivis 267022
mindd 270167
cmpri 282310
Mod32 311108
uutoineg 355591
Mod16 389733
cgetg_block 408505
gc_utoi 468560
dvdiu 576586
mpdiv 667742
cmpsr 796109
rdivss 839647
real2n 1067481
addri 1109403
gc_utoipos 1153913
real_0 1156804
equalis 1181999
equalsi 1182181
mpround 1216587
absrnz_equal2n 1292768
umodui 1296416
cmpss 1427033
Mod8 2073831
mpcmp 2227689
udivuu_rem 2416426
Mod2 2479158
gc_int 2574286
mulru 2765892
subir 3006731
equaliu 3018586
equalui 3018586
itou_or_0 3041670
maxdd 3183937
cmpis 3634920
negr 3671501
cmpsi 3866920
ceildivuu 3905753
Fl_center 4486394
absrnz_equal1 4520905
real_1_bit 4706408
maxuu 4815254
mod4 4932742
umuluu_or_0 5529861
umuluu_le 5803291
subsi 6117305
subri 6129958
truedivsi 6202031
affsi 6383663
mulrs 7181596
fractor 7376760
gc_NULL 7972483
cmpir 9432322
ugcdiu 10105900
cmpui 10119756
cmpiu 10119810
affectsign_safe 10738306
uabsdiviu_rem 11892741
addrs 12307047
smodss 12508624
rdivii 13099067
rdiviiz 13141913
mod8 13270843
mpabs_shallow 13428463
utor 13463532
affur 13463624
divii 14056853
subrs 16479135
dvdii 16573372
Fl_halve 18026053
modis 19638526
smodis 21176060
evalvalser 21527935
int_bit 22299489
hammingu 24048652
abscmpui 33407593
abscmpiu 33407699
mulri 38033959
mpexpo 38883161
absequaliu 39660737
absequalui 41409659
itos_or_0 43597550
Mod4 43781163
modsi 45225515
affui 45473825
Fl_div 46437794
stack_malloc 46645650
truedivii 47040145
umodi2n 49033326
sdivsi_rem 51429844
gc_bool 52022180
gc_ulong 52173342
affrr_fixlg 54655675
stack_malloc_align 55512125
absi_shallow 58469960
Fl_addmulmul_pre 60070866
mod2 61159331
minuu 69329755
remlll_pre 75597016
evalprecp 78667282
evalvalp 81623909
mpsqr 91038813
Fl_sqr 94865603
Fl_triple 95005171
addiu 97500036
addui 101149838
mod2BIL 103596577
fixlg 104153720
mpodd 115097281
icopyspec 117100434
togglesign_safe 125689052
real_1 129831018
subiu 131693146
subui 136678062
mpshift 153229048
dvmduBIL 165598446
itou 177609186
shiftr 178005695
addis 181621923
gc_double 184437452
vali 190484686
varncmp 217214824
gc_long 242317717
mpsub 251617729
utoineg 294388786
cgetineg 295246209
rtor 295287081
addsi 306805800
muliu 373527271
itos 462342901
shiftr_inplace 463840937
mulis 464522924
Fl_double 468469964
real_0_bit 479227023
addir 480575045
affsr 486171718
stor 486464057
mpadd 574493224
negi 636841401
itor 713686169
Fl_neg 716310494
umodsu 724183042
stoi 772916999
expu 775503573
lg2prec 798399765
mpmul 837707161
rcopy 903257531
affii 910157770
mpneg 916793121
subrr 1000276715
cgetg_copy 1480433175
cmpuu 1492706047
cgetr 1839130814
togglesign 1912428019
minss 2008850413
absi 2067698929
mpabs 2138485715
Fl_sqr_pre 2153484057
setabssign 2205153647
nbits2lg 2363505753
Fl_mul 2415534006
expi 2453692991
addrr 2877060528
remii 3012169575
adduu 3415276420
stackdummy 3645938074
Fl_mul_pre 4078721863
Fl_add 4386525394
leafcopy 4973775486
shift_right 5626454537
dvmdsBIL 7015716248
Fl_sub 7300229346
subii 7665630544
Fl_addmul_pre 7668999050
shift_left 7684247959
uutoi 8816713779
icopy 9058092581
maxss 9741217609
utoi 11909189904
addii 12414314304
evalexpo 13131245625
utoipos 14156170311
gc_const 15519652292
cgetipos 16319886211
cgetg 24545084021
cgeti 27152026792
new_chunk 93286976178
evallg 95271915794
set_avma 129047961379

Generated by: LCOV version 1.16