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 30549-267e77144f) Lines: 1262 1313 96.1 %
Date: 2025-11-16 09:22:34 Functions: 96 97 99.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by 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
mpasin 98
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
mpacosh 742
gpsi_der 784
ggamma1m1 1211
Hseries 1575
mpasinh 1652
G4 1918
mpcosh 3528
gcosh 3619
G3 3689
dlogE 4235
psi_lim 4249
psi_sum 4249
cxpsi 4452
gammafrac24_s 5628
ellKk 6020
ellkprime 6020
mpsinh 6027
mpatanh 6321
lngamma_n 7889
mpfactr_small 7889
gacos 7931
gacosh 7994
gasin 8393
serpsiz0 9086
negeuler 9261
sqrtu 9422
gsinh 11942
psi1series 12285
lngamma1 15656
dblcabs 16716
gasinh 20328
serpsi 21077
psi_n 21322
sergamma 24920
serlngamma0 24955
mulu_interval_step_i 26781
mulu_interval_step_prec 26781
gamma2_n 36379
gammahs 36379
glngamma 38885
gammafrac24 44702
gatanh 45621
gpsi 46767
gatan 59887
mptanh 77056
gtanh 77161
_mul 150033
bern_u 211323
lngamma_sum 213303
Qp_gamma_Dwork 215744
gadw 215746
nboft 215746
Qp_gamma 216242
gamma_optim 225360
gamma_use_1 228153
cxgamma 228187
dblcarg 233368
dblclog 233368
trans_fix_arg 251014
dblcnorm 270727
mpfactr 407605
mpsinhcosh 411002
ggamma 629645
tr 2064041
mparg 4440028
cxarg 4440031
garg 4457555
mpatan 4462835
get_nmax 5498629
atanhuu 5514204
muliunextu 7806824
bern_unextu 7807123
rfix 8880061

Generated by: LCOV version 1.16