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

Generated by: LCOV version 1.16