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 - basemath - QX_factor.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30851-7844d7b3a5) Lines: 912 954 95.6 %
Date: 2026-05-02 09:26:58 Functions: 61 64 95.3 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
BD 2359
BD_deg1 0
BD_odd 406
Beauzamy_bound 62741
DDF_roots 1877640
LLL_check_progress 1547
LLL_cmbf 126
Mignotte_bound 62741
QX_factor 805
QX_gcd 19368
QXk_gcd 189
Rg_is_QXk 0
ZX_DDF 154503
ZX_DDF_max 208717
ZX_divides 6560515
ZX_divides_i 6591448
ZX_factor 38465
ZX_factor_i 39270
ZX_gcd 9558831
ZX_gcd_Flx 3371047
ZX_gcd_all 13379383
ZX_gcd_chinese 117510
ZX_gcd_filter 123720
ZX_gcd_slice 3359341
ZX_gcd_worker 3359341
ZX_is_irred 102590
ZX_is_squarefree 198478
ZX_radical 3168854
ZX_squff 321903
ZXkX_ZXk_divexact 2499495
ZXkX_ZXk_divexact_s 2515187
ZXkX_ZXk_divides_s 3163143
ZXk_center2n 4782462
ZXk_content_shallow 3341393
ZXk_divexact 0
ZXk_divexact_i 2523620
ZXk_divexact_s 7517211
ZXk_divides 6056731
ZXk_divides_i 2729793
ZXk_divides_s 9817442
ZXk_gcd 1650183
ZXk_gcd_i 8452874
ZXk_renormalize 4811447
_gcd 19557
centeri2n 3134158
chk_factors 140
chk_factors_get 350
cmbf 51898
cmbf_precs 51898
combine_factors 51898
dividesii 3375763
fact_from_DDF 39263
factor_bound 62741
invphi 19741
myconcat 2310
next2pow 14
nfrootsQ 1877637
pick_prime 2086356
polcyclofactors 315
poliscyclo 99210
poliscycloprod 1029
rec 1663476
root_bound 113045
shifteval 186382

Generated by: LCOV version 1.16