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.1 lcov report (development 28676-df828f1c94) Lines: 2234 2305 96.9 %
Date: 2023-08-26 07:54:43 Functions: 166 167 99.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Pi2n 21932986
PiI2 261346
PiI2n 262235
Qp_exp 108295
Qp_exp_prec 84
Qp_exp_safe 108758
Qp_log 280473
Qp_sqrt 1897
Qp_sqrtn 2604
Qp_sqrtn_ram 854
Qp_sqrtn_unram 2037
T2 4403853
Z2_sqrt 144690
Z_to_padic 387698
Zn_sqrt 420
Zp_teichmuller 9933
_mul 3525828
_muli 31800575
_mulr 6412640
_one 324678
_oner 13797
_rpowuu_msqr 624744
_rpowuu_sqr 1597605
_sqr 6051913
_sqri 83430995
_sqrr 19735871
abpq_init 273252
abpq_sum 8592549
agm 17483
agm1 17637
agm1cx 644661
agm1r_abs 1280459
agmcx_a_b 644710
agmcx_gap 11530726
agmcx_init 644710
agmr_gap 18472036
catalan 14
constcatalan 14
consteuler 58034
constlog2 24310326
constpi 35108459
cos_p 49
cubic_prec_mask 1663489
cxexp 3292220
cxexpm1 5946
cxlog1p 14
ellE 21
ellK 28
ellK_i 35
exp1r_abs 15341777
expIr 762212
expQ 1468517
expm1_Ir 5890
gcos 154849
gcotan 4207
gexp 14790357
gexpm1 12582
glog 15913942
glog1p 119
gpow 20370879
gpow0 126
gpowers 324684
gpowers0 200038
gpowg0 1603204
gpowgs 117204453
grootsof1 711160
grootsof1_4 574835
gsin 882481
gsinc 2428866
gsincos 3301749
gsqrpowers 37434
gsqrt 48580215
gsqrtn 12645
gtan 217
is_ext_qfr 63
log1p_i 133
log2_split 38968
logagmcx 639082
logagmr_abs 1268577
logr_abs 11780498
logr_aux 10043860
magm 14
magm_gap 84
modlog2 15369345
mpaut 8668340
mpcatalan 14
mpcos 2745069
mpcosm1 10374381
mpcotan 70
mpeuler 58034
mpexp 15351197
mpexp0 71243
mpexp_basecase 15279997
mpexpm1 10773
mplog 146496
mplog1p 63
mplog2 24310255
mppi 35108449
mpsin 849548
mpsinc 2428754
mpsincos 6777598
mpsincosm1 5890
mptan 133
mulii3 20576744
pari_close_floats 314221
pari_init_floats 315892
pi_ramanujan 38382
pow2Pis 7868
powPis 10220
pow_monome 673609
pow_polmod 31360
powcx 266668
powcx_prec 182141
powersr 13797
powfrac 5130520
powgi 98377728
powis 23644067
powiu 101662660
powiu_sign 101507638
powp 161
powps 1307296
powr0 21041
powrfrac 511
powrs 9464173
powrshalf 0
powru 4870567
powruhalf 117857
powuu 48108993
real_I 35
rootsof1_cx 4788
rootsof1pow 12516441
rootsof1powinit 14987
rootsof1q_cx 14154
rootsof1u_cx 1264952
rpowuu 428956
scalarpol_get_1 367439
ser_agm1 21
ser_cmp_expo 49
ser_pow 7952
ser_pow_1 7847
ser_powfrac 7868
serchop 42
serchop0 36547
serchop_i 42
serexp 77231
shiftc_inplace 56109
sin_p 63
sqrt_ser 18690
sqrtnint 23625
sqrtnof1 524334
sqrtnr_abs 1915575
swap_clone 77917
tan_huge_im 4018
teich 4739
teichmuller 4977
teichmullerinit 1225
tofp_safe 13254
trans_eval 3732798
trans_evalgen 1883
transvec 2006262
transvecgen 329
upowers 12017
upowuu 101520091
usqrtn 7658
usqru 19413986
val_from_i 7861
zellagmcx 49

Generated by: LCOV version 1.14