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 30417-3115e90663) Lines: 605 680 89.0 %
Date: 2025-07-28 09:23:22 Functions: 214 238 89.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl_add 4357884823
Fl_addmul_pre 7649575260
Fl_addmulmul_pre 60056035
Fl_center 4030060
Fl_div 46466237
Fl_double 473903301
Fl_ellj_pre 242637
Fl_halve 18013757
Fl_mul 2413157387
Fl_mul_pre 4079307211
Fl_neg 716433182
Fl_sqr 94787653
Fl_sqr_pre 2160760363
Fl_sub 7281682180
Fl_triple 95503630
Mod16 277481
Mod2 2024379
Mod32 199255
Mod4 44327238
Mod64 0
Mod8 2070299
abscmpiu 30976498
abscmpui 30976683
absequaliu 39649893
absequalui 41398794
absi 2060443284
absi_shallow 57516085
absr 140
absrnz_equal1 4515396
absrnz_equal2n 1288939
addii 12372498871
addir 478878128
addis 181293878
addiu 94849699
addri 1109347
addrr 2877943497
addrs 12353734
addsi 306477276
addss 25067
addui 98354083
adduu 3401621674
affectsign 0
affectsign_safe 10736557
affii 908601561
affrr_fixlg 55888117
affsi 6382173
affsr 495568408
affui 45473823
affur 13453518
ceildivuu 3846735
cgetg 24601689327
cgetg_block 393557
cgetg_copy 1464363857
cgeti 27204157531
cgetineg 267309370
cgetipos 16399197157
cgetr 1856933439
cgetr_block 43491
cmpir 9425873
cmpis 3633419
cmpiu 9658127
cmpri 282261
cmprs 40996
cmpsi 3865368
cmpsr 824647
cmpss 1427033
cmpui 9658140
cmpuu 1446494390
divii 14057858
divsi_rem 0
divss 0
divss_rem 0
dvdii 16480651
dvdiiz 0
dvdis 33912
dvdisz 0
dvdiu 576572
dvdiuz 0
dvdsi 371
dvdui 167195
dvmdis 0
dvmdsBIL 7075709999
dvmdsi 0
dvmdss 0
dvmduBIL 163319531
equalis 1174330
equaliu 2995212
equalsi 1174512
equalui 2995214
evalexpo 13252220787
evallg 95416455239
evalprecp 78668249
evalvalp 81624928
evalvalser 21443016
expi 2451563833
expu 786640763
fixlg 104991685
fractor 7375261
gc_NULL 7969155
gc_bool 51915054
gc_const 15501168591
gc_double 184364616
gc_int 2574214
gc_long 239235597
gc_stoi 155882
gc_ulong 50793441
gc_utoi 468501
gc_utoipos 1153901
get_avma 0
hammingu 24045218
icopy 9078195049
icopyspec 116519425
int_bit 22251476
itor 712455440
itos 459010829
itos_or_0 24091176
itou 176158933
itou_or_0 2996099
leafcopy 4954601983
lg2prec 806772018
maxdd 3163245
maxss 9622262954
maxuu 4804871
mindd 270154
minss 2006196598
minuu 68386901
mod16 236596
mod2 61131199
mod2BIL 102262035
mod32 259
mod4 4684327
mod64 0
mod8 13272063
modis 19602559
modsi 45225504
modss 0
mpabs 2131670385
mpabs_shallow 13428463
mpadd 574037475
mpceil 0
mpcmp 2227433
mpcopy 708
mpdiv 667693
mpexpo 38843402
mpfloor 0
mpmul 836992125
mpneg 916474796
mpodd 115070734
mpround 1216538
mpshift 153180647
mpsqr 90934502
mpsub 251431752
mptrunc 49
mulis 464048994
muliu 372420951
mulri 38041325
mulrs 7181596
mulru 2765822
nbits2lg 2380340499
negi 636056488
negr 3692363
new_chunk 93428822232
rcopy 904200751
rdivii 13097427
rdiviiz 13141263
rdivis 0
rdivsi 0
rdivss 839647
real2n 1060991
real_0 1155976
real_0_bit 478665471
real_1 131576816
real_1_bit 4700836
real_m1 455
real_m2n 126
remii 3009385859
remis 0
remlll_pre 75421027
remsi 0
remss 0
rtor 300392259
sdivsi 102149
sdivsi_rem 51429836
sdivss_rem 0
set_avma 129092574145
setabssign 2198054861
shift_left 7745156772
shift_right 5665529687
shiftl 0
shiftlr 0
shiftr 180380715
shiftr_inplace 478614374
smodis 21140226
smodss 12467751
stack_calloc 110070
stack_calloc_align 3300
stack_malloc 46628878
stack_malloc_align 55474775
stackdummy 3638362264
stoi 745521605
stor 495904547
subii 7651132920
subir 3006045
subis 170993
subiu 130234474
subri 6119128
subrr 1000111567
subrs 16512471
subsi 6112238
subss 25067
subui 134472719
subuu 25067
thuemorseu 2851
togglesign 1919125895
togglesign_safe 125075513
truedivii 46782996
truedivis 266804
truedivsi 6202031
uabsdiviu_rem 11892741
uabsdivui_rem 19089
udivuu_rem 159818229
ugcdiu 9985501
ugcdui 2737
umodi2n 48898670
umodsu 724166498
umodui 1296416
umuluu_le 5800680
umuluu_or_0 5550518
utoi 11863488252
utoineg 266451625
utoipos 14218734517
utor 13453414
uutoi 8799914375
uutoineg 355409
vali 187925454
varncmp 217197568
varnmax 203
varnmin 15547

Generated by: LCOV version 1.16