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 - kernel/none - mp_indep.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30364-8108102770) Lines: 535 567 94.4 %
Date: 2025-06-30 09:21:07 Functions: 51 52 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addmulii 168621940
addmulii_gen 90741001
addmulii_inplace 1575334041
addmulii_lg3 472218103
affrr 1378699086
dblexpo 26510928
dblmantissa 0
dbltor 13374495
div0r 187461
divir 3494603
divrs 9961924
divru 1112595287
divsi 175
divsr 798
divur 2493713
int2n 106752855
int2u 25996868
int2um1 8831
invmod2BIL 60593133
invr 63122372
invr_basecase 63121319
mantissa_real 53502362
modii 3077059154
mul0r 482302
mulii 21091876066
mulir 980978946
mulrr 3976829309
mulrrz_3 653986149
mulrrz_3end 774534299
mulrrz_end 3580880303
mulrrz_i 3730723296
mulrrz_int 55651436
mulsi 604465269
mulsr 118058996
mulss 201148667
mului 936808280
mulur 922349722
mulur_2 703976381
muluu 4570275307
rtodbl 289984209
shifti 2257186529
sqri 1900205096
sqrr 593306493
sqrs 1514417
sqru 616607051
sqrz_i 560418615
truedvmdii 133926498
truedvmdis 130841861
truedvmdsi 6202031
trunc2nr 62677222
usqrt 230090425
vals 2249605549

Generated by: LCOV version 1.16