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) Coverage Total Hit
Test: PARI/GP v2.19.0 lcov report (development 31092-e6893b0017) Lines: 88.6 % 690 611
Test Date: 2026-12-05 17:02:54 Functions: 89.9 % 247 222
Legend: Lines:     hit not hit

Function Name Sort by function name Hit count Sort by function hit count
Fl_add 6562049570
Fl_addmul_pre 8206596376
Fl_addmulmul_pre 74221107
Fl_center 4490059
Fl_div 49583656
Fl_double 521756196
Fl_ellj_pre 242762
Fl_halve 20605579
Fl_mul 2549554410
Fl_mul_pre 4450623510
Fl_neg 741583840
Fl_sqr 108121199
Fl_sqr_pre 2568935437
Fl_sub 7689701176
Fl_triple 100246374
Mod16 389809
Mod2 3595514
Mod32 311157
Mod4 50719968
Mod64 0
Mod8 3309346
abscmpiu 32514855
abscmpui 32514855
absequaliu 45906165
absequalui 47655935
absi 2076477394
absi_shallow 60578739
absr 20510
absrnz_equal1 4559285
absrnz_equal2n 1580249
addii 13116139171
addir 490362959
addis 195801626
addiu 101776839
addri 1113221
addrr 3030757831
addrs 12387742
addsi 320990344
addss 25081
addui 105851410
adduu 3540712621
affectsign 0
affectsign_safe 10756458
affii 1002949077
affrr_fixlg 56699611
affsi 6484971
affsr 509056249
affui 47976646
affur 13344806
ceildivuu 3918418
cgetg 28018112738
cgetg_block 430408
cgetg_copy 1490930969
cgeti 28636260477
cgetineg 301591192
cgetipos 16900423317
cgetr 192137847
cgetr_block 44729
cmpir 1730048
cmpis 6119324
cmpiu 13000283
cmpri 303857
cmprs 40996
cmpsi 6351323
cmpsr 796228
cmpss 1416201
cmpui 13000283
cmpuu 318400145
divii 16305268
divmpr 3759
divrmp 1203052
divsi_rem 0
divss 0
divss_rem 0
dvdii 17072654
dvdiiz 0
dvdis 33765
dvdisz 0
dvdiu 576287
dvdiuz 0
dvdsi 371
dvdui 167545
dvmdis 0
dvmdsBIL 7387383998
dvmdsi 0
dvmdss 0
dvmduBIL 172981819
equalis 1149736
equaliu 3042339
equalsi 1149918
equalui 3042339
evalexpo 13969511112
evallg 100064789133
evalprecp 78703538
evalvalp 81660141
evalvalser 25309350
expi 2476523954
expu 955700414
fixlg 106530904
fractor 7387946
fractor_lg 7389437
gc_NULL 7911045
gc_bool 55261003
gc_const 15930589792
gc_double 198995866
gc_int 2818772
gc_long 243066879
gc_stoi 155900
gc_ulong 52332511
gc_utoi 467736
gc_utoipos 1155353
get_avma 0
hammingu 24078775
icopy 9395859081
icopyspec 120486979
int_bit 21021200
itor 451900790
itor_lg 739867942
itos 477871175
itos_or_0 44914189
itou 180921610
itou_or_0 5015382
leafcopy 5280083871
lg2prec 30275101
maxdd 3218295
maxss 7472165746
maxuu 6603106
mindd 265752
minss 2044945326
minuu 57538024
mod16 308664
mod2 65902782
mod2BIL 113535941
mod32 259
mod4 7594957
mod64 0
mod8 15673628
modis 19638526
modsi 45242172
modss 0
mpabs 2118552384
mpabs_shallow 13428274
mpadd 597877799
mpceil 0
mpcmp 2164568
mpcopy 665
mpdiv 0
mpexpo 37846425
mpfloor 0
mpmul 889409704
mpneg 952031905
mpodd 118265882
mpround 1216170
mpshift 153974330
mpsqr 91847956
mpsub 273955512
mptrunc 49
mulis 470840404
muliu 378912257
mulri 53835787
mulrs 7181596
mulru 2765059
nbits2lg 1676089618
negi 661592558
negr 3961179
new_chunk 98637486166
newblock 857713
rcopy 1101969092
rdivii 5744768
rdivii_lg 13134331
rdiviiz 13173958
rdivis 0
rdivsi 0
rdivss 839647
real2n 1070111
real_0 1160889
real_0_bit 498908871
real_1 133396009
real_1_bit 4699304
real_m1 455
real_m2n 126
remii 3104375194
remis 0
remlll_pre 79168020
remsi 0
remss 0
rtor 308825451
rtor_lg 308829805
sdivsi 102165
sdivsi_rem 51446786
sdivss_rem 0
set_avma 136019762566
setabssign 2187216887
shift_left 7847845259
shift_right 5947941235
shiftl 0
shiftlr 0
shiftr 363964841
shiftr_inplace 472700829
smodis 21176116
smodss 13998082
stack_calloc 110658
stack_calloc_align 3325
stack_malloc 46736429
stack_malloc_align 55669797
stackdummy 3738936609
stoi 776272583
stor 2140788
stor_lg 509056249
subii 8009052203
subir 3030783
subis 171754
subiu 133451034
subri 1538256
subrr 1062972515
subrs 16573492
subsi 6244582
subss 25081
subui 138446364
subuu 25081
thuemorseu 3311
togglesign 1996624599
togglesign_safe 157535705
truedivii 54917305
truedivis 268424
truedivsi 6202318
uabsdiviu_rem 26737503
uabsdivui_rem 128885
udivuu_rem 2418435
ugcdiu 10312775
ugcdui 2737
umodi2n 58325892
umodsu 734446474
umodui 710986
umuluu_le 7618608
umuluu_or_0 6314588
utoi 12427370453
utoineg 300668433
utoipos 14661440235
utor 13344666
utor_lg 13344666
uutoi 9225165722
uutoineg 365874
vali 194755393
varncmp 218513608
varnmax 203
varnmin 26180

Generated by: LCOV version 2.0-1