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 30536-6f6fcf9613) Lines: 535 567 94.4 %
Date: 2025-11-05 09:21:39 Functions: 51 52 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addmulii 168634374
addmulii_gen 90744342
addmulii_inplace 1581301904
addmulii_lg3 472707660
affrr 1342991376
dblexpo 25880675
dblmantissa 0
dbltor 13388738
div0r 187461
divir 3503352
divrs 9869866
divru 1083212084
divsi 175
divsr 798
divur 2509036
int2n 105938719
int2u 26154533
int2um1 8831
invmod2BIL 60744881
invr 62831118
invr_basecase 62829947
mantissa_real 53613004
modii 3083143620
mul0r 482296
mulii 20973256784
mulir 985904849
mulrr 3955778434
mulrrz_3 652670858
mulrrz_3end 773384744
mulrrz_end 3555230158
mulrrz_i 3709800345
mulrrz_int 53800618
mulsi 609232466
mulsr 117487218
mulss 201177817
mului 1107352132
mulur 927200326
mulur_2 704653522
muluu 4562815397
rtodbl 288816207
shifti 2269060928
sqri 1911535219
sqrr 588475854
sqrs 731428
sqru 626938816
sqrz_i 555656944
truedvmdii 133944060
truedvmdis 130861706
truedvmdsi 6202031
trunc2nr 62697833
usqrt 232063505
vals 2267474718

Generated by: LCOV version 1.16