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.0 lcov report (development 29806-4d001396c7) Lines: 2252 2317 97.2 %
Date: 2024-12-22 09:08:28 Functions: 166 167 99.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Pi2n 31256215
PiI2 267723
PiI2n 280190
Qp_exp 109098
Qp_exp_prec 98
Qp_exp_safe 109560
Qp_log 196211
Qp_sqrt 1897
Qp_sqrtn 2604
Qp_sqrtn_ram 854
Qp_sqrtn_unram 2037
T2 37541184
Z2_sqrt 144690
Z_to_padic 304146
Zn_sqrt 420
Zp_teichmuller 10815
_mul 4148107
_muli 29989829
_mulr 7148660
_one 779804
_oner 14196
_rpowuu_msqr 627918
_rpowuu_sqr 1617900
_sqr 6370847
_sqri 81894055
_sqrr 16301448
abpq_init 5484221
abpq_sum 70426557
agm 111650
agm1 111832
agm1cx 337102
agm1r_abs 1069839
agmcx_a_b 365851
agmcx_gap 5539414
agmcx_init 365851
agmr_gap 15783956
catalan 14
constcatalan 14
consteuler 57674
constlog2 28786833
constpi 46136439
cos_p 49
cubic_prec_mask 1734586
cxexp 4688942
cxexpm1 20186
cxlog1p 14
ellE 21
ellK 28
ellK_i 35
exp1r_abs 18837709
expIr 881878
expQ 1468583
expm1_Ir 20130
gcos 154862
gcotan 4214
gexp 18583081
gexpm1 26506
glog 17886760
glog1p 119
gpow 21646365
gpow0 126
gpowers 779811
gpowers0 208066
gpowg0 2722358
gpowgs 116989056
grootsof1 1169231
grootsof1_4 1003631
gsin 1252109
gsinc 2319562
gsincos 4698379
gsqrpowers 39711
gsqrt 62688976
gsqrtn 42459
gtan 224
is_ext_qfr 49
log1p_i 133
log2_split 42036
logagmcx 299939
logagmr_abs 995371
logr_abs 13712461
logr_aux 11896934
magm 14
magm_gap 84
modlog2 18854969
mpaut 15720782
mpcatalan 14
mpcos 2745069
mpcosm1 17423517
mpcotan 70
mpeuler 57674
mpexp 18907525
mpexp0 146755
mpexp_basecase 18760956
mpexpm1 24683
mplog 203740
mplog1p 63
mplog2 28786915
mppi 46136288
mpsin 834936
mpsinc 2319450
mpsincos 13828054
mpsincosm1 20130
mptan 133
mulii3 163441119
pari_close_floats 324949
pari_init_floats 326327
pi_ramanujan 41351
pow2Pis 12187
powPis 11683
pow_monome 634504
pow_polmod 24145
powcx 5518378
powcx_prec 192847
powersr 14196
powfrac 10528574
powgi 104587066
powis 21221934
powiu 111173228
powiu_sign 111221484
powp 161
powps 1316939
powr0 21133
powrfrac 518
powrs 5103434
powrshalf 0
powru 6129253
powruhalf 119898
powuu 46423836
real_I 35
rootsof1_cx 4536
rootsof1pow 12939507
rootsof1powinit 15575
rootsof1q_cx 14616
rootsof1u_cx 2156942
rpowuu 445059
scalarpol_get_1 374138
ser_agm1 21
ser_cmp_expo 49
ser_pow 8071
ser_pow_1 7966
ser_powfrac 7987
serchop 42
serchop0 37576
serchop_i 42
serexp 83433
shiftc_inplace 55391
sin_p 63
sqrt_ser 18739
sqrtnint 27300
sqrtnof1 552883
sqrtnr_abs 2796374
swap_clone 83888
tan_huge_im 4018
teich 5565
teichmuller 5803
teichmullerinit 1225
tofp_safe 13257
trans_eval 3875726
trans_evalgen 1967
transvec 2006475
transvecgen 329
upowers 12017
upowuu 112535191
usqrtn 8112
usqru 21514843
val_from_i 7980
zellagmcx 28749

Generated by: LCOV version 1.16