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-05 09:21:30 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 43819
sdivsi 102149
stack_calloc 110578
gc_stoi 155882
dvdui 167195
subis 170994
mod16 241356
Fl_ellj_pre 242611
truedivis 267025
mindd 270168
cmpri 282310
Mod32 311108
uutoineg 355648
Mod16 389733
cgetg_block 408511
gc_utoi 468648
dvdiu 576585
mpdiv 667729
cmpsr 796096
rdivss 839647
real2n 1067487
addri 1109473
gc_utoipos 1153915
real_0 1156777
equalis 1181986
equalsi 1182168
mpround 1216596
absrnz_equal2n 1292830
umodui 1296416
cmpss 1427033
Mod8 2073785
mpcmp 2227721
udivuu_rem 2416426
Mod2 2479242
gc_int 2574313
mulru 2765892
subir 3006707
equaliu 3018585
equalui 3018585
itou_or_0 3041668
maxdd 3184190
cmpis 3634953
negr 3671342
cmpsi 3866951
ceildivuu 3908341
Fl_center 4486439
absrnz_equal1 4521013
real_1_bit 4706596
maxuu 4815235
mod4 4932497
umuluu_or_0 5537703
umuluu_le 5803291
subsi 6117316
subri 6126176
truedivsi 6202031
affsi 6383791
mulrs 7181596
fractor 7376772
gc_NULL 7971451
cmpir 9435042
ugcdiu 10106089
cmpui 10118404
cmpiu 10118477
affectsign_safe 10738753
uabsdiviu_rem 11892741
addrs 12307238
smodss 12488272
rdivii 13098310
rdiviiz 13141327
mod8 13269885
mpabs_shallow 13428463
utor 13463474
affur 13463551
divii 14059739
subrs 16479415
dvdii 16571458
Fl_halve 18020301
modis 19638526
smodis 21176060
evalvalser 21527935
int_bit 22305859
hammingu 24048636
abscmpui 32388179
abscmpiu 32388271
mulri 38034080
mpexpo 38885472
absequaliu 39660541
absequalui 41409473
itos_or_0 43597375
Mod4 43776371
modsi 45225537
affui 45473825
Fl_div 46431443
stack_malloc 46645646
truedivii 47014366
umodi2n 49028431
sdivsi_rem 51429864
gc_bool 52019059
gc_ulong 52169129
affrr_fixlg 54655019
stack_malloc_align 55515667
absi_shallow 57450586
Fl_addmulmul_pre 60070167
mod2 61159224
minuu 69342647
remlll_pre 75506767
evalprecp 78667477
evalvalp 81624001
mpsqr 91042874
Fl_sqr 94869087
Fl_triple 94876754
addiu 95456710
addui 99106500
mod2BIL 103594862
fixlg 104152929
mpodd 115097132
icopyspec 117100098
togglesign_safe 125648654
real_1 129830382
subiu 131692829
subui 136678001
mpshift 153237278
dvmduBIL 165598521
itou 177608735
shiftr 178008179
addis 181623289
gc_double 184410434
vali 190483955
varncmp 217214925
gc_long 242317093
mpsub 251603744
utoineg 294381127
cgetineg 295238570
rtor 295291360
addsi 306808009
muliu 373529521
itos 462305932
shiftr_inplace 463834651
mulis 464519865
Fl_double 467567050
real_0_bit 479277099
addir 480569701
affsr 486142968
stor 486450167
mpadd 574523609
negi 636860947
itor 713618613
Fl_neg 716263324
umodsu 724193889
stoi 772919598
expu 775502630
lg2prec 798337226
mpmul 837709296
rcopy 903237077
affii 909941653
mpneg 916819965
subrr 1000280902
cgetg_copy 1480453339
cmpuu 1492703515
cgetr 1839034402
togglesign 1912311168
minss 2008946118
absi 2067664422
mpabs 2138461337
Fl_sqr_pre 2152303075
setabssign 2205121594
nbits2lg 2363348624
Fl_mul 2413395007
expi 2453526758
addrr 2876848835
remii 3012030687
adduu 3413052746
stackdummy 3639603867
Fl_mul_pre 4078481467
Fl_add 4376144543
leafcopy 4973777758
shift_right 5625989780
dvmdsBIL 7015363399
Fl_sub 7278221845
subii 7665354051
Fl_addmul_pre 7673379134
shift_left 7683786051
uutoi 8812880736
icopy 9057408196
maxss 9720934323
utoi 11903970663
addii 12412529451
evalexpo 13130361719
utoipos 14150689246
gc_const 15518550530
cgetipos 16313916248
cgetg 24531164504
cgeti 27140522377
new_chunk 93264162064
evallg 95237248965
set_avma 129016938483

Generated by: LCOV version 1.16