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 30849-48ff4d246c) Lines: 532 567 93.8 %
Date: 2026-05-01 09:26:53 Functions: 50 52 96.2 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addmulii 168800306
addmulii_gen 90670415
addmulii_inplace 1617844849
addmulii_lg3 475563027
affrr 1378494496
dblexpo 27265271
dblmantissa 0
dbltor 13393758
div0r 0
divir 3261897
divrs 10001225
divru 1117564541
divsi 175
divsr 798
divur 2455687
int2n 108745283
int2u 25350696
int2um1 8831
invmod2BIL 60849180
invr 65189313
invr_basecase 65189214
mantissa_real 54194098
modii 3125046976
mul0r 481876
mulii 21154047593
mulir 994527417
mulrr 4038860493
mulrrz_3 658664419
mulrrz_3end 779584775
mulrrz_end 3639850013
mulrrz_i 3792127779
mulrrz_int 53799439
mulsi 617804307
mulsr 120373701
mulss 201178500
mului 1113087964
mulur 944930351
mulur_2 722308728
muluu 4650662083
rtodbl 295493479
shifti 2287395090
sqri 2077934586
sqrr 595616999
sqrs 732961
sqru 639722433
sqrz_i 562092340
truedvmdii 141894493
truedvmdis 138807879
truedvmdsi 6202318
trunc2nr 62828898
usqrt 251708404
vals 2319271928

Generated by: LCOV version 1.16