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 30702-bddb8d6928) Lines: 1262 1313 96.1 %
Date: 2026-02-23 02:23:56 Functions: 96 97 99.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
G3 3153
G4 1637
Gn24 87
Hseries 1350
Qp_gamma 185309
Qp_gamma_Dwork 184894
Qp_gamma_Morita 410
Qp_gamma_neg_Morita 200
Qp_lngamma 10
Qp_psi 175
_gpsi_der 72
_mul 124466
acos0 12
atan2_agm 136
atanhui 12
atanhuu 4636300
bern_u 180417
bern_unextu 6656975
cbrtu 207
cos12 42
cxarg 3763744
cxgamma 193021
cxpsi 3812
dblcabs 12988
dblcarg 197423
dblclog 197423
dblcnorm 226811
dlogE 3626
ellKk 5129
ellkprime 5129
err_atanh 24
err_psi 6
gacos 6789
gacosh 6835
gadw 184894
gamma2_n 31169
gamma_optim 190716
gamma_use_1 192991
gammafrac24 38137
gammafrac24_s 4805
gammahs 31169
garg 3778434
gasin 7183
gasinh 17384
gatan 51322
gatanh 39088
gcosh 2587
gcotanh 45
get_nmax 4636312
ggamma 537368
ggamma1m1 1038
ggammah 23
glngamma 32265
gpsi 40082
gpsi_der 633
gsinh 10214
gtanh 66119
lngamma1 12189
lngamma_n 6759
lngamma_sum 181367
mpacos 89
mpacosh 628
mparg 3763744
mpasin 83
mpasinh 1409
mpatan 3783285
mpatanh 5413
mpcosh 2520
mpcosh0 5
mpcotanh 5
mpfactr 348499
mpfactr_basecase 424
mpfactr_n 526
mpfactr_small 6759
mpsinh 5156
mpsinh0 0
mpsinhcosh 351506
mptanh 66042
muliunextu 6656975
mulu_interval_step_i 22750
mulu_interval_step_prec 22750
nboft 184894
negeuler 7936
psi1series 10505
psi_lim 3638
psi_n 18275
psi_sum 3638
rfix 7527488
sergamma 21348
serlngamma0 21378
serpsi 18062
serpsiz0 7786
sin12 18
sinx2 24
sqrtu 8045
tr 1768567
trans_fix_arg 210463

Generated by: LCOV version 1.16