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 30482-15ec328664) Lines: 535 567 94.4 %
Date: 2025-09-07 09:24:11 Functions: 51 52 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addmulii 168623402
addmulii_gen 90727425
addmulii_inplace 1581155125
addmulii_lg3 472642805
affrr 1379201791
dblexpo 26464365
dblmantissa 0
dbltor 13386973
div0r 187461
divir 3501378
divrs 9865362
divru 1113037900
divsi 175
divsr 798
divur 2506946
int2n 105911556
int2u 26154311
int2um1 8831
invmod2BIL 60744277
invr 63098581
invr_basecase 63098417
mantissa_real 53598940
modii 3082489562
mul0r 482263
mulii 20972249666
mulir 987309556
mulrr 3996067278
mulrrz_3 654007430
mulrrz_3end 774465851
mulrrz_end 3600130577
mulrrz_i 3747583902
mulrrz_int 55660780
mulsi 609220110
mulsr 118154786
mulss 201178225
mului 1108231610
mulur 928518966
mulur_2 706554407
muluu 4562673808
rtodbl 289736705
shifti 2269469485
sqri 1911817929
sqrr 594050799
sqrs 731686
sqru 627154658
sqrz_i 561086638
truedvmdii 133953912
truedvmdis 130871593
truedvmdsi 6202031
trunc2nr 62696149
usqrt 231859827
vals 2265956524

Generated by: LCOV version 1.16