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-11-12 17:03:01 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 6561757913
Fl_addmul_pre 8206478031
Fl_addmulmul_pre 74218065
Fl_center 4490059
Fl_div 49581110
Fl_double 521567682
Fl_ellj_pre 242726
Fl_halve 20605805
Fl_mul 2549487958
Fl_mul_pre 4449880642
Fl_neg 741566003
Fl_sqr 108118740
Fl_sqr_pre 2568443858
Fl_sub 7689294350
Fl_triple 100143709
Mod16 389809
Mod2 3595514
Mod32 311157
Mod4 50721835
Mod64 0
Mod8 3309346
abscmpiu 32514866
abscmpui 32514866
absequaliu 45906164
absequalui 47655934
absi 2076482775
absi_shallow 60578990
absr 20510
absrnz_equal1 4559168
absrnz_equal2n 1580157
addii 13116973975
addir 490368854
addis 195801842
addiu 101776802
addri 1113221
addrr 3031041629
addrs 12387763
addsi 320990560
addss 25081
addui 105851374
adduu 3540734688
affectsign 0
affectsign_safe 10756731
affii 1002960315
affrr_fixlg 56699523
affsi 6484754
affsr 509054043
affui 47976646
affur 13344764
ceildivuu 3916974
cgetg 28020113266
cgetg_block 430408
cgetg_copy 1490933776
cgeti 28640379699
cgetineg 301593863
cgetipos 16900654772
cgetr 192138854
cgetr_block 44717
cmpir 1730039
cmpis 6119300
cmpiu 13000869
cmpri 303856
cmprs 40996
cmpsi 6351299
cmpsr 796228
cmpss 1416201
cmpui 13000869
cmpuu 318399920
divii 16306824
divmpr 3759
divrmp 1203052
divsi_rem 0
divss 0
divss_rem 0
dvdii 17072396
dvdiiz 0
dvdis 33765
dvdisz 0
dvdiu 576287
dvdiuz 0
dvdsi 371
dvdui 167545
dvmdis 0
dvmdsBIL 7387591717
dvmdsi 0
dvmdss 0
dvmduBIL 171149625
equalis 1149860
equaliu 3042334
equalsi 1150042
equalui 3042334
evalexpo 13970050242
evallg 100070784333
evalprecp 78703534
evalvalp 81660137
evalvalser 25309350
expi 2476490679
expu 955695942
fixlg 106530790
fractor 7387947
fractor_lg 7389438
gc_NULL 7911128
gc_bool 55263542
gc_const 15931445538
gc_double 199016862
gc_int 2818783
gc_long 243063913
gc_stoi 155903
gc_ulong 52333662
gc_utoi 467838
gc_utoipos 1155327
get_avma 0
hammingu 24078734
icopy 9396096635
icopyspec 120487015
int_bit 21041656
itor 451953953
itor_lg 739922108
itos 477900971
itos_or_0 44914245
itou 180921394
itou_or_0 5015378
leafcopy 5279528554
lg2prec 30275584
maxdd 3218534
maxss 7472360106
maxuu 6603109
mindd 265748
minss 2044905542
minuu 57529281
mod16 308660
mod2 65903218
mod2BIL 113537738
mod32 259
mod4 7594955
mod64 0
mod8 15674099
modis 19638526
modsi 45242191
modss 0
mpabs 2118556707
mpabs_shallow 13428274
mpadd 598163300
mpceil 0
mpcmp 2164560
mpcopy 665
mpdiv 0
mpexpo 37849572
mpfloor 0
mpmul 889767731
mpneg 952043084
mpodd 118265130
mpround 1216172
mpshift 153969465
mpsqr 91861488
mpsub 274018629
mptrunc 49
mulis 470865166
muliu 379022053
mulri 53835792
mulrs 7181596
mulru 2765059
nbits2lg 1676292357
negi 661608946
negr 3961185
new_chunk 98648258147
newblock 857701
rcopy 1101975306
rdivii 5744732
rdivii_lg 13134296
rdiviiz 13173923
rdivis 0
rdivsi 0
rdivss 839647
real2n 1070095
real_0 1160900
real_0_bit 499166660
real_1 133396187
real_1_bit 4699145
real_m1 455
real_m2n 126
remii 3105293429
remis 0
remlll_pre 79167996
remsi 0
remss 0
rtor 308822633
rtor_lg 308826987
sdivsi 102165
sdivsi_rem 51446805
sdivss_rem 0
set_avma 136033731590
setabssign 2187221995
shift_left 7847934479
shift_right 5948031080
shiftl 0
shiftlr 0
shiftr 363964969
shiftr_inplace 472699227
smodis 21176116
smodss 13998082
stack_calloc 110620
stack_calloc_align 3325
stack_malloc 46737547
stack_malloc_align 55675498
stackdummy 3738188417
stoi 776255828
stor 2140782
stor_lg 509054043
subii 8009724332
subir 3030802
subis 171754
subiu 133454657
subri 1538342
subrr 1063019465
subrs 16573443
subsi 6244771
subss 25081
subui 138449984
subuu 25081
thuemorseu 3311
togglesign 1996666355
togglesign_safe 157552969
truedivii 54935705
truedivis 268454
truedivsi 6202318
uabsdiviu_rem 26737503
uabsdivui_rem 128885
udivuu_rem 2418435
ugcdiu 10312782
ugcdui 2737
umodi2n 58327759
umodsu 734438168
umodui 710986
umuluu_le 7618608
umuluu_or_0 6349642
utoi 12427613274
utoineg 300671099
utoipos 14661687252
utor 13344624
utor_lg 13344624
uutoi 9225393259
uutoineg 365874
vali 194757586
varncmp 218513206
varnmax 203
varnmin 26180

Generated by: LCOV version 2.0-1