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 29420-55f63b8cfe) Lines: 2260 2325 97.2 %
Date: 2024-07-03 09:03:24 Functions: 166 167 99.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Pi2n 31332907
PiI2 268619
PiI2n 280995
Qp_exp 108820
Qp_exp_prec 98
Qp_exp_safe 109282
Qp_log 195812
Qp_sqrt 1897
Qp_sqrtn 2604
Qp_sqrtn_ram 854
Qp_sqrtn_unram 2037
T2 37584355
Z2_sqrt 144690
Z_to_padic 303489
Zn_sqrt 420
Zp_teichmuller 10549
_mul 4054086
_muli 29919242
_mulr 7134986
_one 426265
_oner 14196
_rpowuu_msqr 627932
_rpowuu_sqr 1603256
_sqr 5876341
_sqri 81724346
_sqrr 16249070
abpq_init 5483856
abpq_sum 70516219
agm 111664
agm1 111846
agm1cx 338467
agm1r_abs 1070500
agmcx_a_b 367216
agmcx_gap 5562205
agmcx_init 367216
agmr_gap 15792559
catalan 14
constcatalan 14
consteuler 57674
constlog2 28886338
constpi 46219996
cos_p 49
cubic_prec_mask 1733925
cxexp 4686511
cxexpm1 20039
cxlog1p 14
ellE 21
ellK 28
ellK_i 35
exp1r_abs 18897744
expIr 878870
expQ 1468579
expm1_Ir 19983
gcos 154864
gcotan 4214
gexp 18629468
gexpm1 26359
glog 17942256
glog1p 119
gpow 21642923
gpow0 126
gpowers 426272
gpowers0 207308
gpowg0 2366728
gpowgs 116160757
grootsof1 1163820
grootsof1_4 1000294
gsin 1260097
gsinc 2319562
gsincos 4695840
gsqrpowers 39711
gsqrt 62531039
gsqrtn 42184
gtan 224
is_ext_qfr 49
log1p_i 133
log2_split 41854
logagmcx 301304
logagmr_abs 996019
logr_abs 13750824
logr_aux 11933113
magm 14
magm_gap 84
modlog2 18915054
mpaut 15730142
mpcatalan 14
mpcos 2745075
mpcosm1 17426753
mpcotan 70
mpeuler 57674
mpexp 18967676
mpexp0 146503
mpexp_basecase 18821337
mpexpm1 24536
mplog 203547
mplog1p 63
mplog2 28886346
mppi 46219728
mpsin 825861
mpsinc 2319450
mpsincos 13840576
mpsincosm1 19983
mptan 133
mulii3 163874966
pari_close_floats 322956
pari_init_floats 324410
pi_ramanujan 41220
pow2Pis 12187
powPis 11669
pow_monome 634085
pow_polmod 24082
powcx 5519839
powcx_prec 192609
powersr 14196
powfrac 10527843
powgi 104545844
powis 21196890
powiu 107867075
powiu_sign 107710176
powp 161
powps 1316672
powr0 21112
powrfrac 518
powrs 5101346
powrshalf 0
powru 6115572
powruhalf 118730
powuu 46306339
real_I 35
rootsof1_cx 4536
rootsof1pow 12516441
rootsof1powinit 14987
rootsof1q_cx 14154
rootsof1u_cx 2149318
rpowuu 430310
scalarpol_get_1 373508
ser_agm1 21
ser_cmp_expo 49
ser_pow 7959
ser_pow_1 7854
ser_powfrac 7875
serchop 42
serchop0 37562
serchop_i 42
serexp 83377
shiftc_inplace 55140
sin_p 63
sqrt_ser 18669
sqrtnint 24353
sqrtnof1 549863
sqrtnr_abs 2730176
swap_clone 83597
tan_huge_im 4018
teich 5299
teichmuller 5537
teichmullerinit 1225
tofp_safe 13252
trans_eval 3876123
trans_evalgen 1953
transvec 2008064
transvecgen 329
upowers 12017
upowuu 111587201
usqrtn 8112
usqru 21475336
val_from_i 7868
zellagmcx 28749

Generated by: LCOV version 1.16