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) Coverage Total Hit
Test: PARI/GP v2.18.1 lcov report (development 31041-bd73e9fcdd) Lines: 76.3 % 962 734
Test Date: 2026-07-22 22:45:42 Functions: 75.6 % 90 68
Legend: Lines:     hit not hit

Function Name Sort by function name Hit count Sort by function hit count
ZpM_ZpC_gauss 0
ZpM_invlift 0
ZpXQXQ_div 0
ZpXQXQ_inv 0
ZpXQXQ_invlift 0
ZpXQX_ZpXQXQ_liftroot 0
ZpXQX_liftroots 0
ZpXQ_sqrt 0
Zq_sqrtnlift 0
_ZpM_eval 0
_ZpM_invd 0
_ZpXQXQ_inv_eval 0
_ZpXQXQ_inv_invd 0
_can5_invd 0
_can5_invl 0
_can5_iter 0
_can5_lin 0
_shift 0
gen_ZpM_Dixon 0
gen_ZpM_Newton 0
gen_ZpXX_Newton 0
to_ZX 0
polhensellift 28
ZqX_ZqXQ_liftroot 35
polteichmuller 35
ZpXQX_liftroots_full 63
ZpXQX_roots 63
ZqX_liftroot 112
ZpX_liftroots 139
ZpXQM_prodFrobenius 147
ZpXQX_liftroot 189
ZpXQX_liftroot_vald 189
ZpX_Frobenius 301
Fp_pow2n 476
mul2n 616
ZpXQX_digits 623
sqr2n 749
ZpXQ_sqrtnlift 1155
ZpX_ZpXQ_liftroot 1729
bezout_lift_fact 1736
_sqrtn_eval 1806
_sqrtn_invd 1806
_can_lin 3654
F3x_frobeniuslift 3717
ZpX_liftroot 6397
ZqX_roots 6941
BezoutPropagate 7441
_can_invd 7476
_can_iter 7476
_canlarge_lin 9212
Flx_Teichmuller_large 10269
_can_invl 11130
Flx_Teichmuller 13986
_canlarge_invd 20706
_canlarge_iter 20706
ZpXQ_log 21103
ZpXQ_log_to_ath 21103
FpXQ_inflate 29918
_canlarge_invl 29918
ZpXQ_div 31605
ZpX_ZpXQ_liftroot_ea 33756
ZpXQX_liftfact 34705
ZqX_liftfact 46570
ZpX_roots 97937
ZpX_liftroots_full 98076
FqV_roots_from_deg1 98138
Zp_div 107987
Zp_exp 107987
ZpXQX_divrem 146440
Zp_sqrtlift 156632
ZpXQ_inv 180719
Zp_log 196232
gen_ZpX_Dixon 200858
BuildTree 201480
MultiLift 201525
ZpXQ_invlift 201822
ZpX_liftfact 249595
Zp_sqrtnlift 265863
gen_ZpX_Newton 266911
ZpXQ_HenselLift 507236
_inv_invd 523095
_inv_eval 523096
ZpXQ_RecTreeLift 1146933
Zp_sqrt 1329879
Zp_inv 1342721
Zp_invlift 1342721
Zp_divlift 1450706
ZpX_HenselLift 1615364
ZpX_RecTreeLift 3988052
quadratic_prec_mask 4880154

Generated by: LCOV version 2.0-1