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 - alglin1.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30256-57c6c2b57f) Lines: 2703 3076 87.9 %
Date: 2025-05-09 09:19:30 Functions: 296 316 93.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FlkM_inv 0
FpM_intersect 0
FpM_invimage 0
RgM_indexrank_FqM 0
RgMs_structelim 0
RgV_deplin 0
ZM_imagecompl 0
ZM_inv_ratlift 0
ZabM_inv_ratlift 0
_F2xqM_mul 0
_copy 0
add_slices 0
eigen 0
gc_gauss 0
gc_ker 0
gen_gc_ker 0
gen_matcolinvimage 0
gen_matmul_sw 0
reducemodlll 0
subtract_slices 0
F2m_image 7
F2xqM_det 7
F2xqM_image 7
F2xqM_indexrank 7
F2xqM_ker 7
F2xqM_rank 7
F2xqM_suppl 7
FlxqM_indexrank 7
FqM_indexrank 7
image2 7
reducemodinvertible 7
FpM_FpC_invimage_gen 8
F2m_suppl 14
F2xqM_F2xqC_gauss 14
F2xqM_deplin 14
F2xqM_gauss 14
FlxqM_FlxqC_gauss 14
FlxqM_suppl 14
FpM_FpC_gauss 14
FqM_FqC_gauss 14
RgC_inflate 14
F2xqM_F2xqC_invimage 21
F2xqM_F2xqC_mul 21
F2xqM_gauss_pivot 21
F2xqM_invimage 21
F2xqM_ker_i 21
FlxqM_FlxqC_invimage 21
FlxqM_gauss 21
FlxqM_image 21
FqM_FqC_invimage 21
FqM_gauss 21
QM_rank 21
gen_get_suppl 21
gen_suppl 21
FlxqM_det 28
FlxqM_ker 28
RgM_RgC_invimage_FpC 28
RgM_deplin_i 28
RgM_div 28
RgM_indexrank_FpM 28
gen_matinv_upper 28
F2xqM_inv 35
FlxqM_FlxqC_mul 35
FlxqM_deplin 35
FlxqM_rank 35
FpM_gauss 35
FpM_invimage_gen 35
RgM_image_FqM 35
gen_matrank 35
FlxqM_invimage 42
FqM_invimage 42
RgM_det_FqM 42
RgM_inv_FqM 42
F2Ms_colelim 46
FqM_image 49
RgM_deplin_FqM 49
RgM_rank_FqM 49
F2m_indexrank 53
RgM_is_symmetric_cx 53
eigen_err 53
FlxqM_inv 56
FpM_rank 56
F2xqM_gauss_gen 63
FqM_FqC_mul 63
RgM_RgC_solve_FpC 63
gen_invimage_CUP 63
FqM_det 70
FqM_rank 70
RgM_suppl_FpM 70
gen_matcolinvimage_i 71
gen_matinv_upper_ind 77
gen_matinvimage 77
FqM_deplin 84
RgM_invimage_FpM 84
imagecompl 84
imagecompl_aux 84
FlxqM_gauss_i 91
RgM_ker_FqM 91
FqM_inv 98
Flm_suppl 105
FqM_gauss_pivot_gen 105
RgM_deplin_FpM 105
RgM_solve_FpM 105
gen_deplin_echelon 105
QM_deplin 119
FqM_ker_gen 126
RgM_rank_FpM 126
FqM_gauss_gen 133
gen_det_CUP 140
gen_invimage 140
mateigen 144
RgMs_structelim_col 147
gen_colei 154
RgM_suppl_fast 175
suppl 175
ZabM_pseudoinv 182
QM_det 203
matimage0 217
det_init_max 252
gen_det 294
FpM_det_gen 315
FlxqM_gauss_pivot 361
RgM_invimage 364
RgM_invimage_fast 364
RgM_rank_fast 371
rank 371
RgM_deplin 385
RgM_deplin_fast 385
deplin 385
coeff_det 406
gen_det_i 420
gauss 434
FqM_gauss_pivot 438
det_bareiss 462
RgM_image_FpM 525
RgM_ker_FpM 553
gen_gauss_CUP 559
gen_pivots_CUP 610
RgM_Fp_init3 658
det_develop 658
ZabM_ker 679
ZabM_ker_check 711
FlxqM_ker_i 812
gen_Gauss_pivot 1119
FpM_gauss_pivot_gen 1214
gauss_pivot_ker 1271
gen_ker 1271
ker_aux 1271
FlkM_ker 1332
FpXM_ratlift 1332
QM_indexrank 1344
F2xqM_mul 1449
row_count_non_zero 1456
col_count_non_zero 1470
FqM_suppl 1481
RgM_det_FpM 1519
gen_pivots 1722
ZabM_inv 1897
ZabM_true_Hadamard 1897
RgM_inv_FpM 2051
ZabM_inv_slice 2063
ZabM_inv_worker 2063
gen_rsolve_upper_2 2256
gen_ker_echelon 2373
gen_matneg 2450
ZabM_indexrank 2485
FpM_ker_gen 2642
FpM_gauss_gen 2749
gen_gauss 3036
FlkM_adjoint 3320
FqM_ker 3451
FqM_ker_i 3535
RgM_RgC_invimage_fast 3654
gen_ker_i 3672
gauss_get_pivot_NZ 3752
RgM_RgC_invimage 3759
inverseimage 3920
gen_solve_upper_1 4035
RgM_Fp_init 4599
FlmV_recover_pre 4652
FpM_det 4683
ZM_pseudoinv 5040
QM_image 5411
gen_Gauss 5816
vecnorml1 5817
gen_rsolve_upper 5840
gen_lsolve_upper_2 5894
QM_gauss 5978
RgM_image_fast 6034
image 6034
gen_lsolve_lower_unit_2 6065
QM_image_shallow 6181
ZM_indeximage 6181
indeximage0 6181
QM_gauss_i 6307
QC_normalize 6314
_FqM_mul 6349
fill_wcol 7449
rem_singleton 7642
_FlxqM_mul 7924
ZM_det2 8722
closemodinvertible 9133
gen_CUP 10598
RgM_ker_fast 10668
ker 10668
indexcompl 12199
gen_rsolve_lower_unit_2 12590
gen_zerocol 13108
gen_zeromat 13108
gen_lsolve_upper 13882
gen_colneg 14704
gen_CUP_basecase 16007
gen_lsolve_lower_unit 16025
gen_echelon 17685
QM_ker 18235
RgM_Hadamard 20017
ZM_det_slice 20872
ZM_det_worker 20872
_gen_get_col 21485
indexrank_all 21854
_FpM_mul 22487
det0 26593
set_pivot_fun_all 26784
gen_rsolve_lower_unit 30422
RgM_det_fast 33907
Flm_image 40859
FpM_indexrank 42726
ZM_inv0 43532
perm_complete 43708
matker0 46221
gen_matscalmul 47140
gen_matcolmul 48648
RgM_solve_fast 48783
ZM_ker 49269
detint 49964
_gen_addmul 57335
det_simple_gauss 58227
Flm_indexrank 58450
gen_matsub 63502
parallelogramarea 64380
QM_inv 65325
ZM_ker_i 66629
ZM_ker_chinese 69755
gen_matmul 75983
gen_matmul_classical 75983
gen_matmul_i 75983
FpM_ratlift_worker 76803
RgM_indexrank_fast 77597
indexrank 77597
FqM_mul 86016
RgM_det2 94288
rem_col 95959
ZM_det3 100472
ZM_ker_filter 105426
ZM_det 130793
ZM_ker_slice 133560
ZM_ker_worker 133560
det2 134527
FlxqM_mul 148988
ZM_detmult 166023
RgM_pivots 167644
gauss_get_pivot_padic 201820
det 246213
FpM_intersect_i 263894
FpM_suppl 267294
init_suppl 267795
get_suppl 267797
FpM_FpC_invimage 297544
gen_colscalmul 310391
FpM_image 330537
gen_matcolmul_i 350531
FpM_inv 351810
FpM_gauss_i 351859
image_from_pivot 371495
FpM_deplin 456338
RgM_inv 526331
RgM_inv_fast 526331
gen_colsub 574403
FpM_gauss_pivot 640608
ZM_inv1 644316
RgM_true_Hadamard 720836
ZM_inv2 725228
ZM_adj_ratlift 758708
can_ratlift 765969
ZM_inv_slice 794243
ZM_inv_worker 794243
FpM_ker 849684
RgM_RgC_solve_fast 1177478
RgM_solve_realimag 1215496
RgM_solve 1226261
get_col 1265729
FpM_init 1289594
FpM_ker_i 1308666
FpM_init3 1308670
RgM_inv_upper 1617352
RgM_solve_basecase 1692238
ZM_gauss 1711001
ZM_gauss_i 1711001
ZM_indexrank 1742364
set_pivot_fun 1908119
init_pivot_list 1925678
indexrank0 1941269
ZM_gauss_slice 2018783
ZM_gauss_worker 2018784
ZM_inv 2068590
ZM_inv_i 2133915
ZM_rank 2225356
init_gauss 2376982
split_realimag 2570175
gauss_get_pivot_max 2592985
FpM_ratlift_parallel 2738494
RgM_inv_upper_ind 3230641
ZM_count_0_cols 4214122
ZM_pivots 4227757
split_realimag_col 4517006
_submul 18302242

Generated by: LCOV version 1.16