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.16.2 lcov report (development 29115-f22e516b23) Lines: 2255 2322 97.1 %
Date: 2024-03-29 08:06:26 Functions: 166 167 99.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Pi2n 30337726
PiI2 265497
PiI2n 268094
Qp_exp 108268
Qp_exp_prec 98
Qp_exp_safe 108730
Qp_log 196485
Qp_sqrt 1897
Qp_sqrtn 2604
Qp_sqrtn_ram 854
Qp_sqrtn_unram 2037
T2 28502663
Z2_sqrt 144690
Z_to_padic 303682
Zn_sqrt 420
Zp_teichmuller 9933
_mul 3789304
_muli 30002011
_mulr 7053513
_one 334589
_oner 13755
_rpowuu_msqr 624920
_rpowuu_sqr 1597247
_sqr 5711655
_sqri 81908569
_sqrr 16130492
abpq_init 4390634
abpq_sum 53486755
agm 74977
agm1 75159
agm1cx 295672
agm1r_abs 940404
agmcx_a_b 324421
agmcx_gap 4854196
agmcx_init 324421
agmr_gap 13785978
catalan 14
constcatalan 14
consteuler 57495
constlog2 28477346
constpi 44941139
cos_p 49
cubic_prec_mask 1725058
cxexp 4166557
cxexpm1 6452
cxlog1p 14
ellE 21
ellK 28
ellK_i 35
exp1r_abs 19208131
expIr 872285
expQ 1468534
expm1_Ir 6396
gcos 154873
gcotan 39483
gexp 17409637
gexpm1 12763
glog 17322420
glog1p 119
gpow 21380195
gpow0 126
gpowers 334595
gpowers0 200652
gpowg0 2277886
gpowgs 114843115
grootsof1 1119685
grootsof1_4 958019
gsin 2290234
gsinc 2319562
gsincos 4246219
gsqrpowers 37394
gsqrt 57417065
gsqrtn 41974
gtan 224
is_ext_qfr 49
log1p_i 133
log2_split 31887
logagmcx 258509
logagmr_abs 902613
logr_abs 13473377
logr_aux 11775129
magm 14
magm_gap 84
modlog2 19239019
mpaut 15186279
mpcatalan 14
mpcos 2745081
mpcosm1 16883590
mpcotan 70
mpeuler 57495
mpexp 19285194
mpexp0 140086
mpexp_basecase 19145275
mpexpm1 10948
mplog 203444
mplog1p 63
mplog2 28477297
mppi 44940958
mpsin 826148
mpsinc 2319450
mpsincos 13310586
mpsincosm1 6396
mptan 133
mulii3 121854595
pari_close_floats 316343
pari_init_floats 318198
pi_ramanujan 31398
pow2Pis 7903
powPis 11591
pow_monome 624699
pow_polmod 23753
powcx 4461217
powcx_prec 187542
powersr 13755
powfrac 9404424
powgi 103366527
powis 21105959
powiu 97084617
powiu_sign 96925294
powp 161
powps 1305479
powr0 21056
powrfrac 511
powrs 5095423
powrshalf 0
powru 6008841
powruhalf 117813
powuu 46240462
real_I 163
rootsof1_cx 4480
rootsof1pow 12516441
rootsof1powinit 14987
rootsof1q_cx 14154
rootsof1u_cx 2060153
rpowuu 428872
scalarpol_get_1 370355
ser_agm1 21
ser_cmp_expo 49
ser_pow 7959
ser_pow_1 7854
ser_powfrac 7875
serchop 42
serchop0 37377
serchop_i 42
serexp 82962
shiftc_inplace 53896
sin_p 63
sqrt_ser 18669
sqrtnint 24347
sqrtnof1 543293
sqrtnr_abs 2743966
swap_clone 63815
tan_huge_im 39284
teich 4739
teichmuller 4977
teichmullerinit 1225
tofp_safe 13265
trans_eval 3867488
trans_evalgen 1883
transvec 2013830
transvecgen 329
upowers 12017
upowuu 101185817
usqrtn 8107
usqru 19147383
val_from_i 7868
zellagmcx 28749

Generated by: LCOV version 1.14