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) Coverage Total Hit
Test: PARI/GP v2.18.1 lcov report (development 31042-0fbe168e69) Lines: 95.9 % 1331 1277
Test Date: 2026-07-23 17:04:59 Functions: 99.0 % 97 96
Legend: Lines:     hit not hit

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

Generated by: LCOV version 2.0-1