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 30674-be81ecfdd4) Lines: 535 567 94.4 %
Date: 2026-02-13 09:23:38 Functions: 51 52 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addmulii 168689724
addmulii_gen 90751622
addmulii_inplace 1578266470
addmulii_lg3 472333135
affrr 1344686013
dblexpo 25898077
dblmantissa 0
dbltor 13385995
div0r 186656
divir 3502247
divrs 9871425
divru 1084510232
divsi 175
divsr 798
divur 2508510
int2n 106490396
int2u 26083421
int2um1 8831
invmod2BIL 60786032
invr 62863078
invr_basecase 62862478
mantissa_real 54193116
modii 3083782738
mul0r 482283
mulii 20964139421
mulir 989207526
mulrr 3959704369
mulrrz_3 652918610
mulrrz_3end 773631426
mulrrz_end 3558013566
mulrrz_i 3712274017
mulrrz_int 53801043
mulsi 615577934
mulsr 117507664
mulss 201182214
mului 1114170380
mulur 929706667
mulur_2 706933876
muluu 4570517535
rtodbl 288695124
shifti 2262912505
sqri 1901851261
sqrr 589331356
sqrs 735575
sqru 627361257
sqrz_i 556519372
truedvmdii 134204529
truedvmdis 131124004
truedvmdsi 6202031
trunc2nr 62687008
usqrt 234220034
vals 2280459359

Generated by: LCOV version 1.16