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 30802-b11b770002) Lines: 605 680 89.0 %
Date: 2026-04-11 09:26:21 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 19040
addss 25067
subss 25067
subuu 25067
dvdis 33737
cmprs 40996
cgetr_block 44254
sdivsi 102147
stack_calloc 110655
gc_stoi 155901
dvdui 167195
subis 171736
Fl_ellj_pre 238055
mindd 264379
truedivis 268372
cmpri 284263
mod16 307030
Mod32 311108
uutoineg 362393
Mod16 389733
cgetg_block 426419
gc_utoi 468677
dvdiu 576276
mpdiv 665511
umodui 711392
cmpsr 796104
rdivss 839647
real2n 1068610
addri 1106274
equalis 1151117
equalsi 1151299
gc_utoipos 1153594
real_0 1157680
mpround 1216586
absrnz_equal2n 1300213
cmpss 1392943
Mod8 2073824
mpcmp 2226353
Mod2 2370287
udivuu_rem 2418379
gc_int 2739135
mulru 2765892
subir 3004977
equaliu 3021720
equalui 3021721
itou_or_0 3147023
maxdd 3211553
cmpis 3634491
negr 3682691
cmpsi 3866493
ceildivuu 3904113
Fl_center 4486194
absrnz_equal1 4553759
real_1_bit 4714073
mod4 5140791
subri 6091943
subsi 6184719
truedivsi 6202150
umuluu_or_0 6271959
affsi 6446262
maxuu 6610887
mulrs 7181596
fractor 7379013
umuluu_le 7617880
gc_NULL 7963665
cmpir 9444002
ugcdiu 10320246
affectsign_safe 10730847
uabsdiviu_rem 11892741
addrs 12360792
smodss 12471217
cmpui 12980543
cmpiu 12980656
rdivii 13104215
rdiviiz 13148655
mpabs_shallow 13428463
divii 14046513
utor 14335031
affur 14335146
mod8 15587556
subrs 16536215
dvdii 16894045
Fl_halve 18777092
modis 19638526
int_bit 20924132
smodis 21176088
hammingu 24048705
evalvalser 24359582
abscmpui 32546235
abscmpiu 32546281
mulri 38284482
mpexpo 38877451
absequaliu 39546169
absequalui 41296195
Mod4 43842743
itos_or_0 44911658
modsi 45242150
affui 45491533
Fl_div 46822855
stack_malloc 46928518
umodi2n 48985855
sdivsi_rem 51446596
gc_ulong 52088133
truedivii 54746720
stack_malloc_align 55535292
affrr_fixlg 56107743
absi_shallow 56599883
gc_bool 56772626
mod2 62589411
Fl_addmulmul_pre 64509432
minuu 69679075
remlll_pre 75621137
evalprecp 78673515
evalvalp 81630248
Fl_triple 87341120
mpsqr 91031108
addiu 97156091
Fl_sqr 99474255
addui 101231116
fixlg 105835201
mod2BIL 107446007
mpodd 116092303
icopyspec 117836064
subiu 133393121
real_1 133635464
subui 138369618
mpshift 153495419
togglesign_safe 157296936
dvmduBIL 163655595
itou 179079340
gc_double 184191702
shiftr 187921250
vali 190995435
addis 194704621
varncmp 199446300
gc_long 242665639
mpsub 251564465
utoineg 298106612
cgetineg 298967374
rtor 303752382
addsi 319891727
muliu 373243090
Fl_double 442463534
shiftr_inplace 467113958
mulis 467117491
itos 476315139
real_0_bit 482179092
addir 483052055
affsr 501240131
stor 501660729
mpadd 572809342
negi 640945955
itor 716836280
Fl_neg 729160871
umodsu 734174750
expu 797089185
stoi 799101954
lg2prec 815858717
mpmul 836950558
rcopy 916771834
mpneg 926592558
affii 964489482
subrr 1006295431
cmpuu 1490662499
cgetg_copy 1491872347
cgetr 1875763934
togglesign 1953428745
minss 2026480760
absi 2068733060
mpabs 2139684002
setabssign 2206856586
Fl_sqr_pre 2339508424
nbits2lg 2402762427
expi 2425351932
Fl_mul 2438381525
addrr 2931185985
remii 3061647302
adduu 3446810818
stackdummy 3683539070
Fl_mul_pre 4222163724
leafcopy 5062867267
shift_right 5732316914
Fl_add 6142604390
dvmdsBIL 7150098269
Fl_sub 7384276200
Fl_addmul_pre 7660865535
subii 7718996606
shift_left 7794829199
uutoi 8931889199
icopy 9155232735
maxss 9693775350
utoi 12047075955
addii 12532255013
evalexpo 13390596415
utoipos 14268115181
gc_const 15650442640
cgetipos 16454160811
cgetg 25527108493
cgeti 27472433875
new_chunk 95115165838
evallg 96859303522
set_avma 131341809673

Generated by: LCOV version 1.16