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 30744-52374ab6cf) Lines: 1262 1313 96.1 %
Date: 2026-03-17 09:26:37 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
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
mpasin 745
gpsi_der 784
ggamma1m1 1211
Hseries 1575
G4 1918
mpasinh 3346
mpcosh 3528
gcosh 3619
G3 3689
dlogE 4235
psi_lim 4249
psi_sum 4249
cxpsi 4452
gammafrac24_s 5628
ellKk 6020
ellkprime 6020
mpsinh 6377
mpatanh 7665
lngamma_n 7889
mpfactr_small 7889
gacos 7931
gacosh 7994
gasin 9040
sqrtu 9422
serpsiz0 10486
negeuler 10661
gsinh 12992
psi1series 13685
lngamma1 15655
dblcabs 16716
psi_n 21322
serpsi 23877
mulu_interval_step_i 27481
mulu_interval_step_prec 27481
sergamma 27720
serlngamma0 27755
gamma2_n 37779
gammahs 37779
glngamma 38885
gasinh 39578
gammafrac24 46102
gpsi 49567
gatan 59887
gatanh 68651
mptanh 77056
gtanh 77161
_mul 150033
bern_u 211323
lngamma_sum 213302
gadw 215744
nboft 215744
Qp_gamma_Dwork 215745
Qp_gamma 216243
gamma_optim 225363
gamma_use_1 228156
cxgamma 228191
dblcarg 233371
dblclog 233371
trans_fix_arg 251018
dblcnorm 270729
mpfactr 407955
mpsinhcosh 411002
ggamma 634199
tr 2374141
cxarg 4472348
mparg 4472348
garg 4489877
mpatan 4495800
get_nmax 5506787
atanhuu 5516474
muliunextu 7807340
bern_unextu 7807452
rfix 8944692

Generated by: LCOV version 1.16