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 - trans2.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30862-ea47bd413c) Lines: 1274 1328 95.9 %
Date: 2026-05-05 09:26:54 Functions: 96 97 99.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
G3 3689
G4 1918
Gn24 105
Hseries 1575
Qp_gamma 216243
Qp_gamma_Dwork 215746
Qp_gamma_Morita 490
Qp_gamma_neg_Morita 238
Qp_lngamma 14
Qp_psi 245
_gpsi_der 84
_mul 150033
acos0 14
atan2_agm 184
atanhui 14
atanhuu 5519073
bern_u 211323
bern_unextu 7828879
cbrtu 245
cos12 49
cxarg 4477419
cxgamma 229005
cxpsi 4452
dblcabs 16716
dblcarg 234183
dblclog 234181
dblcnorm 271666
dlogE 4235
ellKk 6020
ellkprime 6020
err_atanh 28
err_psi 7
gacos 7931
gacosh 7994
gadw 215746
gamma2_n 37751
gamma_optim 226173
gamma_use_1 228966
gammafrac24 46074
gammafrac24_s 5628
gammahs 37751
garg 4494959
gasin 9033
gasinh 40698
gatan 59915
gatanh 70121
gcosh 3619
gcotanh 63
get_nmax 5502562
ggamma 635643
ggamma1m1 1211
ggammah 28
glngamma 38899
gpsi 50239
gpsi_der 805
gsinh 12894
gtanh 77161
lngamma1 15685
lngamma_n 7889
lngamma_sum 214086
mpacos 105
mpacosh 742
mparg 4477399
mpasin 738
mpasinh 3360
mpatan 4500941
mpatanh 7665
mpcosh 3528
mpcosh0 7
mpcotanh 7
mpfactr 407955
mpfactr_basecase 524
mpfactr_n 643
mpfactr_small 7889
mpsinh 6391
mpsinh0 0
mpsinhcosh 411002
mptanh 77056
muliunextu 7828663
mulu_interval_step_i 27453
mulu_interval_step_prec 27453
nboft 215746
negeuler 11081
psi1series 13958
psi_lim 4249
psi_n 21322
psi_sum 4249
rfix 8954799
sergamma 28392
serlngamma0 28427
serpsi 24570
serpsiz0 10906
sin12 21
sinx2 28
sqrtu 9422
tr 2474896
trans_fix_arg 251832

Generated by: LCOV version 1.16