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 Coverage Total Hit
Test: PARI/GP v2.18.1 lcov report (development 31041-bd73e9fcdd) Lines: 91.3 % 140220 128013
Test Date: 2026-07-22 22:45:42 Functions: 93.3 % 12606 11762
Legend: Rating: low: < 75 % medium: >= 75 % high: >= 90 %

File Sort by file name Line Coverage Sort by line coverage Function Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
ZG.c
60.3%60.3%
60.3 % 73 44 57.1 % 14 8
base5.c
68.4%68.4%
68.4 % 1587 1085 85.2 % 88 75
F3v.c
74.5%74.5%
74.5 % 204 152 65.7 % 35 23
FpV.c
74.5%74.5%
74.5 % 989 737 79.1 % 139 110
Zp.c
76.3%76.3%
76.3 % 962 734 75.6 % 90 68
FpXX.c
76.8%76.8%
76.8 % 1229 944 84.4 % 135 114
pclgp.c
77.2%77.2%
77.2 % 2381 1838 85.0 % 180 153
FlxX.c
80.5%80.5%
80.5 % 1492 1201 75.5 % 200 151
ifactor1.c
81.1%81.1%
81.1 % 2319 1881 88.2 % 127 112
lll.c
81.3%81.3%
81.3 % 1643 1335 96.2 % 131 126
aprcl.c
82.4%82.4%
82.4 % 704 580 96.0 % 50 48
FpXQX_factor.c
82.6%82.6%
82.6 % 1977 1633 82.2 % 157 129
mpqs.c
82.6%82.6%
82.6 % 841 695 89.5 % 38 34
F2x.c
83.6%83.6%
83.6 % 1838 1536 89.3 % 214 191
galconj.c
83.6%83.6%
83.6 % 2318 1937 79.1 % 153 121
ZV.c
84.7%84.7%
84.7 % 990 839 87.3 % 150 131
crvwtors.c
84.8%84.8%
84.8 % 323 274 83.3 % 30 25
Flxq_log.c
84.8%84.8%
84.8 % 534 453 100.0 % 29 29
factcyclo.c
84.9%84.9%
84.9 % 1079 916 90.6 % 85 77
polarit3.c
86.5%86.5%
86.5 % 2201 1904 89.9 % 228 205
Flx.c
86.6%86.6%
86.6 % 2953 2556 82.2 % 370 304
buch2.c
87.4%87.4%
87.4 % 2538 2218 90.3 % 176 159
alglin3.c
87.6%87.6%
87.6 % 646 566 85.2 % 61 52
alglin1.c
87.8%87.8%
87.8 % 3078 2704 93.7 % 316 296
RgV.c
88.1%88.1%
88.1 % 578 509 91.3 % 104 95
F2v.c
88.4%88.4%
88.4 % 628 555 80.9 % 68 55
ellanal.c
88.7%88.7%
88.7 % 986 875 92.0 % 87 80
FF.c
89.3%89.3%
89.3 % 1443 1289 91.9 % 149 137
FpE.c
89.4%89.4%
89.4 % 1277 1142 92.0 % 137 126
lambert.c
89.8%89.8%
89.8 % 264 237 81.8 % 22 18
hnf_snf.c
90.2%90.2%
90.2 % 1787 1611 90.7 % 107 97
polarit2.c
90.3%90.3%
90.3 % 2530 2284 95.6 % 225 215
arith1.c
90.3%90.3%
90.3 % 2352 2124 93.6 % 236 221
RgX.c
90.5%90.5%
90.5 % 1808 1636 91.2 % 226 206
concat.c
90.7%90.7%
90.7 % 387 351 94.4 % 18 17
alglin2.c
90.7%90.7%
90.7 % 1187 1077 92.7 % 96 89
ecpp.c
90.8%90.8%
90.8 % 805 731 94.9 % 98 93
prime.c
90.9%90.9%
90.9 % 707 643 92.2 % 77 71
Qfb.c
91.3%91.3%
91.3 % 1264 1154 93.2 % 146 136
ZX.c
91.4%91.4%
91.4 % 814 744 92.5 % 107 99
FpX_factor.c
91.7%91.7%
91.7 % 1426 1308 91.9 % 124 114
lfunutils.c
91.7%91.7%
91.7 % 1740 1596 94.2 % 172 162
FpX.c
91.8%91.8%
91.8 % 2164 1986 93.5 % 230 215
base4.c
91.8%91.8%
91.8 % 1852 1701 92.0 % 187 172
hyperellperiods.c
92.1%92.1%
92.1 % 302 278 96.8 % 31 30
perm.c
92.2%92.2%
92.2 % 1111 1024 94.1 % 119 112
lfunlarge.c
92.5%92.5%
92.5 % 518 479 97.3 % 75 73
subcyclo.c
92.8%92.8%
92.8 % 656 609 93.9 % 49 46
gen3.c
92.9%92.9%
92.9 % 2658 2470 95.9 % 246 236
elltrans.c
93.0%93.0%
93.0 % 1479 1376 97.4 % 116 113
nffactor.c
93.2%93.2%
93.2 % 1317 1227 95.0 % 80 76
ellrank.c
93.2%93.2%
93.2 % 1228 1145 93.9 % 114 107
buch3.c
93.3%93.3%
93.3 % 1631 1521 96.0 % 124 119
modsym.c
93.3%93.3%
93.3 % 3016 2815 98.0 % 301 295
F2xqE.c
93.5%93.5%
93.5 % 478 447 93.3 % 60 56
Fle.c
93.6%93.6%
93.6 % 456 427 89.1 % 64 57
gen2.c
93.6%93.6%
93.6 % 1667 1561 94.9 % 158 150
arith2.c
93.9%93.9%
93.9 % 558 524 93.4 % 76 71
gen1.c
94.0%94.0%
94.0 % 2028 1907 100.0 % 104 104
base2.c
94.0%94.0%
94.0 % 2369 2227 97.8 % 178 174
rootpol.c
94.2%94.2%
94.2 % 1561 1470 96.7 % 121 117
polmodular.c
94.1%94.1%
94.1 % 2817 2651 96.3 % 163 157
elliptic.c
94.2%94.2%
94.2 % 4183 3940 97.8 % 371 363
quad.c
94.3%94.3%
94.3 % 731 689 93.4 % 61 57
bb_group.c
94.4%94.4%
94.4 % 586 553 100.0 % 37 37
bibli1.c
94.5%94.5%
94.5 % 1243 1175 92.8 % 83 77
trans3.c
94.5%94.5%
94.5 % 1279 1209 98.8 % 85 84
ispower.c
94.7%94.7%
94.7 % 677 641 94.6 % 37 35
base1.c
94.8%94.8%
94.8 % 1830 1734 88.7 % 159 141
FlxqE.c
95.0%95.0%
95.0 % 932 885 95.7 % 92 88
base3.c
95.0%95.0%
95.0 % 2159 2051 95.4 % 237 226
bern.c
95.3%95.3%
95.3 % 381 363 97.4 % 38 37
ellsea.c
95.2%95.2%
95.2 % 1254 1194 94.7 % 95 90
bibli2.c
95.4%95.4%
95.4 % 1295 1235 95.9 % 121 116
dirichlet.c
95.5%95.5%
95.5 % 506 483 93.3 % 45 42
buch1.c
95.5%95.5%
95.5 % 711 679 92.9 % 56 52
digits.c
95.6%95.6%
95.6 % 204 195 100.0 % 27 27
elltors.c
95.7%95.7%
95.7 % 440 421 92.3 % 26 24
polarit1.c
95.7%95.7%
95.7 % 326 312 100.0 % 32 32
char.c
95.7%95.7%
95.7 % 864 827 100.0 % 64 64
buch4.c
95.8%95.8%
95.8 % 144 138 100.0 % 7 7
subgroup.c
96.0%96.0%
96.0 % 371 356 100.0 % 24 24
QX_factor.c
95.9%95.9%
95.9 % 952 913 95.3 % 64 61
trans2.c
95.9%95.9%
95.9 % 1331 1277 99.0 % 97 96
nflist.c
96.0%96.0%
96.0 % 3395 3260 97.6 % 335 327
ellpadic.c
96.2%96.2%
96.2 % 611 588 100.0 % 47 47
lerch.c
96.5%96.5%
96.5 % 373 360 100.0 % 23 23
msfarey.c
96.9%96.9%
96.9 % 193 187 100.0 % 17 17
lfunquad.c
96.8%96.8%
96.8 % 348 337 97.7 % 43 42
bit.c
96.8%96.8%
96.8 % 444 430 94.7 % 38 36
bb_hnf.c
96.8%96.8%
96.8 % 664 643 96.4 % 55 53
hgm.c
96.9%96.9%
96.9 % 1255 1216 100.0 % 139 139
hyperell.c
96.9%96.9%
96.9 % 1606 1556 99.3 % 135 134
bnfunits.c
97.0%97.0%
97.0 % 232 225 100.0 % 14 14
nflistQT.c
97.0%97.0%
97.0 % 169 164 100.0 % 12 12
zetamult.c
97.1%97.1%
97.1 % 592 575 97.8 % 45 44
trans1.c
97.2%97.2%
97.2 % 2260 2196 99.4 % 169 168
ramanujantau.c
97.3%97.3%
97.3 % 110 107 100.0 % 12 12
Flv.c
97.2%97.2%
97.2 % 758 737 93.5 % 62 58
mftrace.c
97.4%97.4%
97.4 % 7741 7537 99.2 % 778 772
lfun.c
97.5%97.5%
97.5 % 1637 1596 100.0 % 163 163
polclass.c
97.5%97.5%
97.5 % 846 825 98.6 % 73 72
bnflog.c
97.8%97.8%
97.8 % 278 272 100.0 % 26 26
subfield.c
98.0%98.0%
98.0 % 946 927 100.0 % 51 51
qfisom.c
98.1%98.1%
98.1 % 879 862 100.0 % 54 54
qfsolve.c
98.3%98.3%
98.3 % 634 623 100.0 % 34 34
volcano.c
98.6%98.6%
98.6 % 345 340 100.0 % 28 28
mellininv.c
98.6%98.6%
98.6 % 354 349 100.0 % 40 40
grossenchar.c
98.6%98.6%
98.6 % 1048 1033 100.0 % 66 66
Ser.c
98.8%98.8%
98.8 % 164 162 100.0 % 21 21
kummer.c
98.8%98.8%
98.8 % 867 857 100.0 % 61 61
ellisog.c
98.9%98.9%
98.9 % 1043 1032 100.0 % 89 89
map.c
99.2%99.2%
99.2 % 242 240 100.0 % 30 30
random.c
99.4%99.4%
99.4 % 162 161 100.0 % 17 17
hypergeom.c
99.4%99.4%
99.4 % 686 682 100.0 % 69 69
matperm.c
100.0%
100.0 % 78 78 100.0 % 4 4
ellpadiclambdamu.c
100.0%
100.0 % 113 113 100.0 % 7 7

Generated by: LCOV version 2.0-1