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-18 09:22:37 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 43867
sdivsi 102150
stack_calloc 110588
gc_stoi 155883
dvdui 167195
subis 170994
mod16 241354
Fl_ellj_pre 242607
truedivis 266822
mindd 270158
cmpri 282310
Mod32 311108
uutoineg 355611
Mod16 389733
cgetg_block 408358
gc_utoi 468537
dvdiu 576568
mpdiv 667716
cmpsr 796107
rdivss 839647
real2n 1067404
addri 1109285
gc_utoipos 1153869
real_0 1156720
equalis 1181677
equalsi 1181859
mpround 1216552
absrnz_equal2n 1292470
umodui 1296416
cmpss 1427033
Mod8 2073883
mpcmp 2227501
udivuu_rem 2416419
Mod2 2479188
gc_int 2574323
mulru 2765892
subir 3006713
equaliu 3018574
equalui 3018574
itou_or_0 3041673
maxdd 3182432
cmpis 3634882
negr 3670683
ceildivuu 3849042
cmpsi 3866879
Fl_center 4486495
absrnz_equal1 4519448
real_1_bit 4706350
maxuu 4815079
mod4 4932470
umuluu_or_0 5534893
umuluu_le 5803291
subsi 6117337
subri 6123331
truedivsi 6202031
affsi 6383360
mulrs 7181596
fractor 7376743
gc_NULL 7970125
cmpir 9428889
ugcdiu 10077057
cmpiu 10120892
cmpui 10120909
affectsign_safe 10736951
uabsdiviu_rem 11892741
addrs 12304758
smodss 12507699
rdivii 13100663
rdiviiz 13146369
mod8 13272550
mpabs_shallow 13428463
utor 13463372
affur 13463482
divii 14060007
subrs 16476589
dvdii 16559471
Fl_halve 18024020
modis 19638526
smodis 21176060
evalvalser 21527935
int_bit 22313590
hammingu 24048652
abscmpui 32377433
abscmpiu 32377546
mulri 38033994
mpexpo 38857153
absequaliu 39660351
absequalui 41408507
itos_or_0 43597224
Mod4 43777321
modsi 45225519
affui 45473825
Fl_div 46531565
stack_malloc 46643842
truedivii 46814140
umodi2n 49029574
sdivsi_rem 51429852
gc_bool 52000876
gc_ulong 52183908
affrr_fixlg 54649507
stack_malloc_align 55490751
absi_shallow 57434097
Fl_addmulmul_pre 60024479
mod2 61153574
minuu 69104520
remlll_pre 75482352
evalprecp 78666930
evalvalp 81624129
mpsqr 90975672
Fl_sqr 94886347
addiu 95428164
Fl_triple 95472714
addui 99077964
mod2BIL 103590502
fixlg 104147178
mpodd 115086755
icopyspec 117029761
togglesign_safe 125527169
real_1 129798577
subiu 131684747
subui 136669791
mpshift 153186853
dvmduBIL 165713823
itou 177093350
shiftr 177975197
addis 181580975
gc_double 184372999
vali 190345961
varncmp 217212690
gc_long 242071167
mpsub 251487954
utoineg 294181719
cgetineg 295039208
rtor 295272475
addsi 306766790
muliu 373506553
itos 462070862
mulis 463135800
shiftr_inplace 463766387
Fl_double 469706097
real_0_bit 479008564
addir 479884078
affsr 486032074
stor 486339002
mpadd 574239992
negi 636693766
itor 713174951
Fl_neg 716575150
umodsu 724212996
stoi 772618764
expu 775311798
lg2prec 797916868
mpmul 837316027
rcopy 902741525
affii 909163970
mpneg 916634357
subrr 1000083760
cgetg_copy 1479819266
cmpuu 1492628613
cgetr 1838493894
togglesign 1910967133
minss 2008543460
absi 2060575056
mpabs 2131363223
Fl_sqr_pre 2153383158
setabssign 2198045305
nbits2lg 2362973271
Fl_mul 2413990812
expi 2453265372
addrr 2875550074
remii 3013109722
adduu 3411062928
stackdummy 3640904483
Fl_mul_pre 4081552265
Fl_add 4378281493
leafcopy 4964939033
shift_right 5625386006
dvmdsBIL 7013454775
Fl_sub 7282436006
subii 7664597615
Fl_addmul_pre 7681859511
shift_left 7682561810
uutoi 8807775721
icopy 9055508606
maxss 9719894337
utoi 11899268901
addii 12405504171
evalexpo 13123975616
utoipos 14143252204
gc_const 15512661474
cgetipos 16301654559
cgetg 24527694430
cgeti 27123295295
new_chunk 93232387599
evallg 95196689357
set_avma 128961143706

Generated by: LCOV version 1.16