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 30862-ea47bd413c) Lines: 605 680 89.0 %
Date: 2026-05-06 09:26:47 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
varnmax 203
mod32 259
dvdsi 371
real_m1 455
mpcopy 665
ugcdui 2737
thuemorseu 3313
stack_calloc_align 3325
varnmin 10374
uabsdivui_rem 16693
absr 20510
addss 25067
subss 25067
subuu 25067
dvdis 33751
cmprs 40996
cgetr_block 44599
sdivsi 102150
stack_calloc 110688
gc_stoi 155893
dvdui 167195
subis 171740
Fl_ellj_pre 238079
mindd 264387
truedivis 268361
mpdiv 291572
cmpri 303451
mod16 307022
Mod32 311108
uutoineg 362518
Mod16 389733
cgetg_block 424792
gc_utoi 468737
dvdiu 576272
umodui 711392
cmpsr 796217
rdivss 839647
real2n 1068689
addri 1111503
equalis 1151335
equalsi 1151517
gc_utoipos 1153572
real_0 1160602
mpround 1216596
absrnz_equal2n 1302863
cmpss 1392943
Mod8 2073918
mpcmp 2162953
Mod2 2370291
udivuu_rem 2418435
gc_int 2740394
mulru 2766032
subir 3000347
equalui 3021974
equaliu 3021975
itou_or_0 3146600
maxdd 3215668
cmpis 3634222
negr 3695942
cmpsi 3866220
ceildivuu 3902784
Fl_center 4489148
absrnz_equal1 4559267
real_1_bit 4714793
mod4 5141118
subri 6132368
subsi 6184758
truedivsi 6202318
umuluu_or_0 6264613
affsi 6447600
maxuu 6600072
mulrs 7181596
fractor 7389195
umuluu_le 7618608
gc_NULL 7964923
cmpir 9446620
ugcdiu 10319477
affectsign_safe 10731187
uabsdiviu_rem 11892741
addrs 12387762
smodss 12486303
cmpiu 12969047
cmpui 12969086
rdivii 13117456
rdiviiz 13163525
mpabs_shallow 13428463
divii 14038566
utor 14266774
affur 14266895
mod8 15583687
subrs 16568214
dvdii 16904653
Fl_halve 18777148
modis 19638526
int_bit 20966295
smodis 21176102
hammingu 24048734
evalvalser 25308636
abscmpui 32101126
abscmpiu 32101199
mulri 38601667
mpexpo 38879998
absequaliu 39545783
absequalui 41295813
Mod4 43874210
itos_or_0 44885842
modsi 45242133
affui 45491533
Fl_div 46795937
stack_malloc 46932860
umodi2n 49017643
sdivsi_rem 51446750
gc_ulong 51710283
truedivii 54726333
stack_malloc_align 55541185
absi_shallow 56152371
affrr_fixlg 56156126
gc_bool 56820696
mod2 62590186
Fl_addmulmul_pre 64561706
minuu 69832909
remlll_pre 75636164
evalprecp 78672813
evalvalp 81629471
Fl_triple 87502205
mpsqr 90785796
addiu 96305581
Fl_sqr 99491364
addui 100379117
fixlg 105905402
mod2BIL 107447172
mpodd 116095015
icopyspec 118080309
subiu 133460711
real_1 133784413
subui 138437824
mpshift 153494964
togglesign_safe 157270296
dvmduBIL 163611233
itou 179100065
gc_double 184173738
shiftr 188318843
vali 191310096
addis 194824421
varncmp 199750117
gc_long 242712047
mpsub 249773843
utoineg 298334713
cgetineg 299195430
rtor 303889108
addsi 320010813
muliu 373358240
Fl_double 443436707
shiftr_inplace 467023808
mulis 467104315
itos 476267936
addir 483324167
real_0_bit 492445463
affsr 501633457
stor 501946979
mpadd 572052753
negi 641188673
itor 717456941
Fl_neg 729171977
umodsu 734172434
expu 797525528
stoi 799431145
lg2prec 816782349
mpmul 834941126
rcopy 917317001
mpneg 928261694
affii 965030181
subrr 1011329242
cmpuu 1484598358
cgetg_copy 1493549622
cgetr 1878695725
togglesign 1955901426
minss 2030216494
absi 2070361103
mpabs 2141301458
setabssign 2208708470
Fl_sqr_pre 2337338585
nbits2lg 2407848982
expi 2426744183
Fl_mul 2435499971
addrr 2939729004
remii 3062169785
adduu 3448180129
stackdummy 3683614757
Fl_mul_pre 4220536334
leafcopy 5067820082
shift_right 5741494625
Fl_add 6152238601
dvmdsBIL 7158586850
Fl_sub 7387822363
Fl_addmul_pre 7657660139
subii 7719318186
shift_left 7807482590
uutoi 8938335814
icopy 9157485541
maxss 9679066214
utoi 12053123045
addii 12535337587
evalexpo 13427592067
utoipos 14270351068
gc_const 15658999948
cgetipos 16453533880
cgetg 25567554803
cgeti 27482237899
new_chunk 95214635164
evallg 96934644522
set_avma 131461510317

Generated by: LCOV version 1.16