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 - trans1.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30702-bddb8d6928) Lines: 2194 2259 97.1 %
Date: 2026-02-23 02:23:56 Functions: 168 169 99.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
powrshalf 0
cxlog1p 10
catalan 11
constcatalan 11
mpcatalan 11
magm 12
ser_agm1 17
ellE 18
real_I 26
serchop 30
serchop_i 30
is_ext_qfr 35
cos_p 36
ser_cmp_expo 42
mplog1p 45
sin_p 46
mpcotan 57
magm_gap 72
Qp_exp_prec 76
glog1p 85
gpow0 92
log1p_i 95
mptan 97
ellK 114
ellK_i 120
powp 136
gtan 164
transvecgen 280
Zn_sqrt 360
powrfrac 377
Up_sqrtn_ram 668
teichmullerinit 1050
pari_close_floats 1499
pari_init_floats 1499
Up_sqrt 1562
Qp_sqrt 1586
trans_evalgen 1663
dvdsi_quot 1962
Qp_sqrtn 2163
pi_ramanujan 2823
log2_split 3252
tan_huge_im 3436
gcotan 3599
rootsof1_cx 4336
teich 4732
teichmuller 4935
swap_clone 6490
ser_pow_1 6872
usqrtn 6881
val_from_i 6882
ser_powfrac 6888
ser_pow 6947
upowers 8478
Zp_teichmuller 9231
tofp_safe 9689
powPis 10300
pow2Pis 10606
_oner 12117
powersr 12117
sqrt_ser 16029
expm1_Ir 16595
mpsincosm1 16595
cxexpm1 16642
powr0 18145
pow_polmod 20084
mpexpm1 20709
sqrtnint 22212
gexpm1 22429
zellagmcx 24642
rootsof1q_cx 25524
rootsof1powinit 32544
serchop0 33002
gsqrpowers 33903
gsqrtn 39005
consteuler 48783
mpeuler 48783
serexp 73031
Qp_exp 92920
Qp_exp_safe 93314
agm 96133
agm1 96375
powruhalf 103272
shiftc_inplace 104358
Z2_sqrt 107647
gcos 125438
mpexp0 126284
mplog 160162
powcx_prec 163908
Qp_log 168079
gpowers0 178799
PiI2 228730
PiI2n 257673
Z_to_padic 260014
logagmcx 298317
scalarpol_get_1 312545
agm1cx 330363
rpowuu 334076
agmcx_a_b 355005
agmcx_init 355005
_one 433633
gpowers 433638
_rpowuu_msqr 493121
sqrtnof1 497509
pow_monome 538368
mpsin 622694
logagmr_abs 698477
agm1r_abs 762640
expIr 773761
grootsof1_4 857294
gsin 979472
grootsof1 1037169
expQ 1052507
powps 1128770
mulpowu 1128825
_rpowuu_sqr 1270651
cubic_prec_mask 1521888
transvec 1759875
rootsof1u_cx 1886045
mpcos 1975580
mpsinc 1988098
gsinc 1988180
gpowg0 2125573
sqrtnr_abs 2398334
trans_eval 3402203
cxexp 3550769
gsincos 3558605
_mul 3656891
powrs 4312231
abpq_init 4670753
powcx 4729969
_sqr 5063120
powru 5251183
agmcx_gap 5447989
_mulr 6075619
powfrac 9053549
logr_aux 10281791
agmr_gap 11161291
mpsincos 11402393
logr_abs 11697432
mpaut 12770124
rootsof1pow 13037544
_sqrr 13862119
mpcosm1 13995973
gexp 14944132
mpexp_basecase 15175199
exp1r_abs 15240613
modlog2 15249054
mpexp 15301483
glog 15396801
gpow 16768929
usqru 17553774
_muli 22062309
powis 23341076
constlog2 23965235
mplog2 23965235
Pi2n 25004998
T2 35593460
mppi 37709552
constpi 37709561
powuu 40509068
gsqrt 54549097
_sqri 59770950
abpq_sum 66516291
upowuu 89011177
powgi 89345398
powiu 90962511
powiu_sign 91055254
gpowgs 105419236
mulii3 161425768

Generated by: LCOV version 1.16