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 30572-91e0396466) Lines: 605 680 89.0 %
Date: 2025-12-13 09:22:30 Functions: 214 238 89.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl_add 4384056611
Fl_addmul_pre 7677452156
Fl_addmulmul_pre 60116795
Fl_center 4486494
Fl_div 46461354
Fl_double 468832825
Fl_ellj_pre 242642
Fl_halve 18034978
Fl_mul 2416628005
Fl_mul_pre 4087015961
Fl_neg 716259467
Fl_sqr 94891407
Fl_sqr_pre 2155882107
Fl_sub 7316712939
Fl_triple 95147758
Mod16 389733
Mod2 2479128
Mod32 311108
Mod4 43781551
Mod64 0
Mod8 2073848
abscmpiu 33876677
abscmpui 33876572
absequaliu 39660658
absequalui 41409572
absi 2067704646
absi_shallow 58939460
absr 140
absrnz_equal1 4520947
absrnz_equal2n 1292751
addii 12414739418
addir 480578869
addis 181609872
addiu 98442193
addri 1109443
addrr 2876778242
addrs 12307138
addsi 306792447
addss 25067
addui 102092025
adduu 3416086486
affectsign 0
affectsign_safe 10738731
affii 910078250
affrr_fixlg 54655431
affsi 6383651
affsr 486183123
affui 45473821
affur 13463664
ceildivuu 3908089
cgetg 24551989854
cgetg_block 408508
cgetg_copy 1480442927
cgeti 27157126701
cgetineg 295236773
cgetipos 16322031610
cgetr 1839148276
cgetr_block 43872
cmpir 9433229
cmpis 3634925
cmpiu 10118491
cmpri 282310
cmprs 40996
cmpsi 3866923
cmpsr 796099
cmpss 1427033
cmpui 10118398
cmpuu 1492719051
divii 14061801
divsi_rem 0
divss 0
divss_rem 0
dvdii 16572960
dvdiiz 0
dvdis 33709
dvdisz 0
dvdiu 576584
dvdiuz 0
dvdsi 371
dvdui 167195
dvmdis 0
dvmdsBIL 7015364741
dvmdsi 0
dvmdss 0
dvmduBIL 165657497
equalis 1182173
equaliu 3018591
equalsi 1182355
equalui 3018591
evalexpo 13130270548
evallg 95287891733
evalprecp 78667229
evalvalp 81623593
evalvalser 21527935
expi 2453751150
expu 775522333
fixlg 104153353
fractor 7376766
gc_NULL 7971920
gc_bool 52019310
gc_const 15519662365
gc_double 184456201
gc_int 2574341
gc_long 242318969
gc_stoi 155883
gc_ulong 52181472
gc_utoi 468580
gc_utoipos 1153896
get_avma 0
hammingu 24048641
icopy 9058281090
icopyspec 117100183
int_bit 22307661
itor 713700542
itos 462313792
itos_or_0 43597531
itou 177609068
itou_or_0 3041664
leafcopy 4973852917
lg2prec 798367837
maxdd 3184022
maxss 9756913710
maxuu 4815332
mindd 270165
minss 2008803124
minuu 69245663
mod16 241353
mod2 61160058
mod2BIL 103596004
mod32 259
mod4 4932581
mod64 0
mod8 13269082
modis 19638526
modsi 45225526
modss 0
mpabs 2138494689
mpabs_shallow 13428463
mpadd 574393730
mpceil 0
mpcmp 2227697
mpcopy 665
mpdiv 667751
mpexpo 38885417
mpfloor 0
mpmul 837632403
mpneg 916824031
mpodd 115097749
mpround 1216579
mpshift 153214853
mpsqr 91044105
mpsub 251634446
mptrunc 49
mulis 464505724
muliu 373529638
mulri 38034096
mulrs 7181596
mulru 2765892
nbits2lg 2363548566
negi 636873815
negr 3671455
new_chunk 93298804101
rcopy 903271664
rdivii 13099215
rdiviiz 13141931
rdivis 0
rdivsi 0
rdivss 839647
real2n 1067492
real_0 1156782
real_0_bit 479109948
real_1 129833238
real_1_bit 4706399
real_m1 455
real_m2n 126
remii 3012125547
remis 0
remlll_pre 75542217
remsi 0
remss 0
rtor 295289233
sdivsi 102145
sdivsi_rem 51429853
sdivss_rem 0
set_avma 129063103268
setabssign 2205161265
shift_left 7684144745
shift_right 5626394095
shiftl 0
shiftlr 0
shiftr 178008982
shiftr_inplace 463838510
smodis 21176060
smodss 12491042
stack_calloc 110582
stack_calloc_align 3307
stack_malloc 46645697
stack_malloc_align 55514605
stackdummy 3649566625
stoi 772726121
stor 486471681
subii 7665782634
subir 3006727
subis 170989
subiu 131694756
subri 6131423
subrr 1000258723
subrs 16479234
subsi 6117309
subss 25067
subui 136679725
subuu 25067
thuemorseu 2851
togglesign 1912352571
togglesign_safe 125649078
truedivii 47018981
truedivis 267030
truedivsi 6202031
uabsdiviu_rem 11892741
uabsdivui_rem 16693
udivuu_rem 2416426
ugcdiu 10105865
ugcdui 2737
umodi2n 49033618
umodsu 724201044
umodui 1296416
umuluu_le 5803291
umuluu_or_0 5539395
utoi 11911159251
utoineg 294379105
utoipos 14158221362
utor 13463562
uutoi 8817905055
uutoineg 355618
vali 190483708
varncmp 217214747
varnmax 203
varnmin 15547

Generated by: LCOV version 1.16