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 - Zp.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30702-bddb8d6928) Lines: 734 873 84.1 %
Date: 2026-02-23 02:23:56 Functions: 69 80 86.2 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
BezoutPropagate 6262
BuildTree 162664
F3x_frobeniuslift 3186
Flx_Teichmuller 11978
Fp_pow2n 374
FqV_roots_from_deg1 76474
MultiLift 162686
ZpM_ZpC_gauss 0
ZpM_invlift 0
ZpXQM_prodFrobenius 126
ZpXQX_ZpXQXQ_liftroot 0
ZpXQX_digits 534
ZpXQX_divrem 125520
ZpXQX_liftfact 29555
ZpXQX_liftroot 187
ZpXQX_liftroot_vald 187
ZpXQX_liftroots 0
ZpXQX_liftroots_full 48
ZpXQX_roots 48
ZpXQ_HenselLift 426722
ZpXQ_RecTreeLift 966531
ZpXQ_div 27090
ZpXQ_inv 155124
ZpXQ_invlift 172770
ZpXQ_log 17646
ZpXQ_log_to_ath 17646
ZpXQ_sqrt 0
ZpXQ_sqrtnlift 990
ZpX_Frobenius 258
ZpX_HenselLift 1327483
ZpX_RecTreeLift 3264894
ZpX_ZpXQ_liftroot 1477
ZpX_ZpXQ_liftroot_ea 28702
ZpX_liftfact 197377
ZpX_liftroot 5465
ZpX_liftroots 117
ZpX_liftroots_full 76426
ZpX_roots 76309
Zp_div 91851
Zp_divlift 1239253
Zp_exp 91851
Zp_inv 1147402
Zp_invlift 1147402
Zp_log 167841
Zp_sqrt 908383
Zp_sqrtlift 111740
Zp_sqrtnlift 205168
ZqX_ZqXQ_liftroot 25
ZqX_liftfact 39595
ZqX_liftroot 132
ZqX_roots 5355
Zq_sqrtnlift 0
_ZpM_eval 0
_ZpM_invd 0
_can5_invd 17702
_can5_invl 25488
_can5_iter 17702
_can5_lin 7786
_can5_mul 35662
_can5_sqr 35494
_can_invd 6408
_can_invl 9540
_can_iter 6408
_can_lin 3132
_inv_eval 445482
_inv_invd 445482
_shift 53364
_sqrtn_eval 1548
_sqrtn_invd 1548
bezout_lift_fact 1460
gen_ZpM_Dixon 0
gen_ZpM_Newton 0
gen_ZpX_Dixon 171334
gen_ZpX_Newton 227665
mul2n 467
polhensellift 24
polteichmuller 25
quadratic_prec_mask 3937140
sqr2n 576
to_ZX 0

Generated by: LCOV version 1.16