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 30417-3115e90663) Lines: 535 567 94.4 %
Date: 2025-07-28 09:23:22 Functions: 51 52 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addmulii 168625075
addmulii_gen 90723716
addmulii_inplace 1575297595
addmulii_lg3 472257613
affrr 1379261756
dblexpo 26509935
dblmantissa 0
dbltor 13374342
div0r 187444
divir 3501380
divrs 9961795
divru 1113247578
divsi 175
divsr 798
divur 2500508
int2n 105875079
int2u 25980078
int2um1 8831
invmod2BIL 60685085
invr 63108813
invr_basecase 63108326
mantissa_real 53496971
modii 3080290034
mul0r 482291
mulii 21112911057
mulir 986162242
mulrr 3995706910
mulrrz_3 654799453
mulrrz_3end 775185323
mulrrz_end 3598079983
mulrrz_i 3746717279
mulrrz_int 55660619
mulsi 604822947
mulsr 118187196
mulss 201176018
mului 946435987
mulur 927348179
mulur_2 705734064
muluu 4565464301
rtodbl 290059743
shifti 2258263225
sqri 1906360005
sqrr 594132266
sqrs 1541182
sqru 623743778
sqrz_i 561134073
truedvmdii 133925323
truedvmdis 130844571
truedvmdsi 6202031
trunc2nr 62685162
usqrt 231723027
vals 2252142489

Generated by: LCOV version 1.16