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 - basemath - gen3.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30702-bddb8d6928) Lines: 2476 2664 92.9 %
Date: 2026-02-23 02:23:56 Functions: 237 247 96.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Itos 15137
QpV_to_QV 168
Qp_to_Q 630
RgC_RgV_mulrealsym 18540
RgM_mulreal 0
RgXY_cxevalx 45
RgX_cxeval 2042118
RgX_deflate_max 623118
RgX_deflate_order 966232
RgX_degree 483785
RgX_derivn 609
RgX_integ 86
ZX_deflate_max 278976
ZX_deflate_order 448646
_abs 444
_egal 83860233
_egal_i 83860233
_gtopoly 2968985
_polcoef 2218860
_quot 750
_quotfi 6
_quotfs 258
_quotqs 24
_quotri 6
_quotrs 24
_quotsf 30
_quotsq 60
_quotsr 60
_rfraccoef 18
_sercoef 95939
ceil_safe 882265
ceilr 1928
centerlift 51810
centerlift0 604
centerliftii 36432
compo 269
constmat 10
content0 112287
deg1pol 211843
deg1pol_shallow 7523099
deg2pol_shallow 269853
degree 9698
denom 185137
denom_i 10301618
denominator 98770
denominator_v 246
denompol 102
deriv 97808
derivn 1070
derivnser 179
derivser 22111
diffop 3030
diffop0 36
diviiround 51889701
divrem 904
err_intformal 30
floor_safe 60959
gceil 201439
gcvtoi 951488
gdeflate 12144
gdivent 5318271
gdiventgs 278856
gdiventres 910
gdiventsg 5316404
gdivmod 0
gdivround 1183539
gdvd 13068
geq 34472920
geval 0
geval_gp 9403
gfloor 4334846
gfrac 365616
gge 196263
ggrando 5607
ggt 1729484
gimag 25159
gle 5449739
glt 5400417
gmod 34136272
gmodgs 18880821
gmodsg 33145653
gmodulo 1635891
gmodulsg 1109337
gmodulss 903644
gne 49387313
gnot 465262
gppadicprec 75
gppoldegree 26327
gprecision 12144124
gpserprec 30
greal 5513
grndtoi 75847326
ground 2349262
gshift 34920851
gsubst 1874796
gsubst_v 60
gsubstpol 7076
gsubstvec 818
gtocol 300
gtocol0 3432
gtocolrev 0
gtocolrev0 252
gtopoly 884153
gtopolyrev 2084832
gtovec 87942
gtovec0 91744
gtovecpost 936
gtovecpre 3282
gtovecrev 0
gtovecrev0 264
gtovecsmall 15146
gtovecsmall0 6682
gtovecsmallpost 84
gtovecsmallpre 84
gtrunc 512211
gtrunc2n 99280300
gvar 109951827
gvar2 17732124
gvar9 48822
hqfeval 120
imag_i 254047283
init_qf_apply 412431
init_vectopre 3234
integ 296
integ_act 12
integser 22632
is_realext 148639
is_realquad 928
iscomplex 0
isinexact 103548699
isinexactreal 12167
isint 415369
isrationalzeroscalar 0
isrealappr 1607412
issmall 279185
lift 1882557
lift0 2153033
lift_shallow 552513
liftall 22494
liftall_shallow 1716408
liftint 100
liftint_shallow 463
liftpol 4882
liftpol_shallow 18811952
listdeflate 16
lookup 714
mkcoln 1182
mkintn 18720
mkpoln 4362432
mkvecn 1043095
mkvecsmalln 114533
modRr_i 4275385
modRr_safe 0
mod_r 156
modrs 12
modsf 30
modsr 30
mulimag 86354
mulreal 13399092
numer 6185
numer_i 7624310
numerator 6437
op_ReIm 173299915
padic_to_Q 590864
padic_to_Q_shallow 12
padicprec 3555
padicprec_relative 1974
polcoef 623111
polcoef_i 3083791
poldeflate 7074
poldegree 124927
poleval 11174236
pollead 1003
prec0 8164036
precCOMPLEX 18167394
precREAL 817952939
precision 827657908
precrealexact 752059
qf_RgM_apply 6507
qf_ZM_apply 405924
qfb_ZM_apply 10
qfb_ZM_apply_i 10
qfbeval 248440
qfbevalb 5
qfbil 0
qfeval 14569
qfeval0 248625
qfevalb 405
qfnorm 0
qfnorm0 248585
quad_floor 421
quot 666
quotfi 6
quotfs 258
quotqs 12
quotrem 444
quotri 6
quotrs 12
quotsf 30
quotsq 30
quotsr 30
real_i 273531080
recvar 64433
rfrac_deriv 47
rfrac_derivn 36
round0 4968
round_i 44916384
roundr 2497480
roundr_safe 217505
safe_polmod 1160
scalarmat2 40
scalarpol 38407920
scalarpol_shallow 3085286
ser2pol_i 8606379
ser2pol_i_normalize 651897
ser2rfrac 597
ser2rfrac_i 9815
ser_inv 39993
ser_unscale 3546
serdeflate 5024
serdiffop 6
serequalXk 18485
serprec 50
serreverse 81
sertrunc 57
sertrunc_copy 1977
simplify 8411348
simplify_shallow 463050860
subst_higher 619649
subst_polmod 490
swapvar_act 22
tayl 15
tayl_act 10
trunc0 158
uu32toi 261273
uu32toineg 92667
var2_aux 8147
var2_polmod 2982
var2_rfrac 5165
variables_vec 32
variables_vecsmall 1101
vdeflate 46
vec_padicprec 705
vec_padicprec_relative 342
vec_serprec 10
vecdenom 197836
vecdenompol 12

Generated by: LCOV version 1.16