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 30838-aa3635ec72) Lines: 532 567 93.8 %
Date: 2026-04-27 09:26:59 Functions: 50 52 96.2 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
dblmantissa 0
div0r 0
divsi 175
divsr 798
int2um1 8831
mul0r 481922
sqrs 732669
divur 2455660
divir 3261894
truedvmdsi 6202318
divrs 10001270
dbltor 13393863
int2u 25350548
dblexpo 27268118
mulrrz_int 53799439
mantissa_real 54198479
invmod2BIL 60815526
trunc2nr 62832918
invr_basecase 65201494
invr 65201833
addmulii_gen 90687596
int2n 108708414
mulsr 120399071
truedvmdis 138808374
truedvmdii 141894170
addmulii 168773705
mulss 201178127
usqrt 251178575
rtodbl 295587360
addmulii_lg3 475527891
sqrz_i 562184120
sqrr 595729110
mulsi 617835578
sqru 639703411
mulrrz_3 658735968
mulur_2 722250990
mulrrz_3end 779666434
mulur 944846387
mulir 994421220
mului 1113437766
divru 1117741430
affrr 1378902542
addmulii_inplace 1617851521
sqri 2078303836
shifti 2287177107
vals 2318889191
modii 3125030945
mulrrz_end 3640440363
mulrrz_i 3792495563
mulrr 4040152366
muluu 4650574962
mulii 21154147637

Generated by: LCOV version 1.16