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 30556-bb9f5f8fc8) Lines: 2679 3077 87.1 %
Date: 2025-11-25 09:20:50 Functions: 290 316 91.8 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FlkM_inv 0
FlxqM_FlxqC_gauss 0
FlxqM_FlxqC_invimage 0
FlxqM_FlxqC_mul 0
FlxqM_deplin 0
FlxqM_det 0
FlxqM_indexrank 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_gauss 7
FlxqM_image 7
FlxqM_inv 7
FlxqM_invimage 7
FlxqM_rank 7
FlxqM_suppl 7
FqM_indexrank 7
gen_matrank 7
image2 7
reducemodinvertible 7
FpM_FpC_invimage_gen 8
F2m_suppl 14
F2xqM_F2xqC_gauss 14
F2xqM_deplin 14
F2xqM_gauss 14
FlxqM_gauss_i 14
FlxqM_ker 14
FpM_FpC_gauss 14
FqM_FqC_gauss 14
RgC_inflate 14
gen_get_suppl 14
gen_suppl 14
F2xqM_F2xqC_invimage 21
F2xqM_F2xqC_mul 21
F2xqM_gauss_pivot 21
F2xqM_invimage 21
F2xqM_ker_i 21
FqM_FqC_invimage 21
FqM_gauss 21
QM_rank 21
RgM_det_FqM 21
RgM_image_FqM 21
RgM_inv_FqM 21
gen_matinv_upper 21
RgM_RgC_invimage_FpC 28
RgM_deplin_FqM 28
RgM_deplin_i 28
RgM_div 28
RgM_indexrank_FpM 28
RgM_rank_FqM 28
F2xqM_inv 35
FpM_gauss 35
FpM_invimage_gen 35
FqM_image 35
FqM_invimage 42
gen_invimage_CUP 42
F2Ms_colelim 46
FqM_FqC_mul 49
FqM_det 49
FqM_rank 49
gen_matcolinvimage_i 50
F2m_indexrank 53
FpM_rank 56
RgM_ker_FqM 56
gen_matinv_upper_ind 56
RgM_is_symmetric_real 60
eigen_err 60
F2xqM_gauss_gen 63
FqM_deplin 63
RgM_RgC_solve_FpC 63
gen_deplin_echelon 63
gen_matinvimage 63
RgM_suppl_FpM 70
FqM_inv 77
RgM_invimage_FpM 84
imagecompl 84
imagecompl_aux 84
gen_det_CUP 98
Flm_suppl 105
FqM_gauss_pivot_gen 105
RgM_deplin_FpM 105
RgM_solve_FpM 105
gen_invimage 105
FlxqM_gauss_pivot 110
FqM_gauss_gen 112
QM_deplin 119
gen_colei 119
FqM_ker_gen 126
RgM_rank_FpM 126
RgMs_structelim_col 147
mateigen 158
RgM_suppl_fast 168
suppl 168
ZabM_pseudoinv 182
matimage0 189
QM_det 203
FqM_gauss_pivot 208
det_init_max 252
FlxqM_ker_i 255
gen_det 287
RgM_invimage 308
RgM_invimage_fast 308
FpM_det_gen 315
RgM_rank_fast 322
rank 322
RgM_deplin 329
RgM_deplin_fast 329
deplin 329
gen_det_i 371
gauss 399
coeff_det 406
det_bareiss 462
gen_pivots_CUP 484
gen_gauss_CUP 510
RgM_image_FpM 630
RgM_ker_FpM 658
det_develop 658
ZabM_ker 679
ZabM_ker_check 711
_FlxqM_mul 714
RgM_Fp_init3 763
gen_Gauss_pivot 980
FqM_suppl 1041
gen_ker 1078
FpM_gauss_pivot_gen 1214
gauss_pivot_ker 1285
ker_aux 1285
FlkM_ker 1332
FpXM_ratlift 1332
QM_indexrank 1344
F2xqM_mul 1449
row_count_non_zero 1456
gen_pivots 1464
col_count_non_zero 1470
RgM_det_FpM 1519
ZabM_inv 1904
ZabM_true_Hadamard 1904
gen_ker_echelon 2016
gen_matneg 2030
gen_rsolve_upper_2 2060
ZabM_inv_slice 2101
ZabM_inv_worker 2101
RgM_inv_FpM 2289
FqM_ker 2348
FqM_ker_i 2411
ZabM_indexrank 2485
FpM_ker_gen 2642
FpM_gauss_gen 2749
gen_gauss 2938
gen_solve_upper_1 3013
gen_ker_i 3094
ZM_ker 3342
FlkM_adjoint 3603
RgM_RgC_invimage_fast 3633
gauss_get_pivot_NZ 3661
RgM_RgC_invimage 3738
inverseimage 3843
closemodinvertible 4353
gen_lsolve_upper_2 4515
gen_Gauss 4699
FpM_det 4816
FlmV_recover_pre 4935
RgM_Fp_init 4942
gen_lsolve_lower_unit_2 5022
ZM_pseudoinv 5089
gen_rsolve_upper 5147
_FqM_mul 5327
QM_image 5411
QM_gauss 5838
vecnorml1 6034
RgM_image_fast 6111
image 6111
QM_gauss_i 6167
QC_normalize 6174
QM_image_shallow 6181
ZM_indeximage 6181
indeximage0 6181
fill_wcol 7446
rem_singleton 7639
gen_CUP 8176
ZM_det2 8981
gen_rsolve_lower_unit_2 9776
gen_zerocol 10035
gen_zeromat 10035
indexcompl 10127
gen_lsolve_upper 10424
gen_CUP_basecase 12206
gen_colneg 12226
gen_lsolve_lower_unit 13043
gen_echelon 13261
_gen_get_col 16059
RgM_Hadamard 20150
ZM_det_slice 20849
ZM_det_worker 20849
indexrank_all 21565
_FpM_mul 22487
gen_rsolve_lower_unit 23254
gen_matcolmul 25722
ZM_ker_chinese 26135
det0 26544
set_pivot_fun_all 27178
RgM_det_fast 34026
gen_matscalmul 37515
ZM_ker_filter 39848
_gen_addmul 40150
Flm_image 41370
FpM_indexrank 41886
perm_complete 43130
ZM_inv0 43210
matker0 46193
RgM_solve_fast 48475
gen_matsub 49852
detint 50202
RgM_ker_fast 56658
ker 56658
Flm_indexrank 58338
det_simple_gauss 58789
QM_ker 64204
parallelogramarea 64611
ZM_ker_i 66671
QM_inv 66994
gen_matmul 73880
gen_matmul_classical 73880
gen_matmul_i 73880
FpM_ratlift_worker 74540
RgM_indexrank_fast 83642
indexrank 83642
FqM_mul 86303
ZM_ker_slice 89982
ZM_ker_worker 89982
RgM_det2 93299
rem_col 95967
ZM_det3 100514
ZM_det 131206
det2 132984
FlxqM_mul 140601
ZM_detmult 164974
RgM_pivots 173690
gauss_get_pivot_padic 201820
det 245877
gen_colscalmul 252655
FpM_intersect_i 262049
FpM_suppl 269008
get_suppl 269312
init_suppl 269314
FpM_FpC_invimage 299616
gen_matcolmul_i 302457
FpM_image 331210
FpM_inv 354680
FpM_gauss_i 354729
image_from_pivot 372643
gen_colsub 456341
FpM_deplin 459547
RgM_inv 614978
RgM_inv_fast 614978
FpM_gauss_pivot 642153
ZM_inv1 646653
RgM_true_Hadamard 719386
ZM_inv2 731530
ZM_adj_ratlift 757058
can_ratlift 764173
ZM_inv_slice 792541
ZM_inv_worker 792542
FpM_ker 851897
RgM_RgC_solve_fast 1240900
RgM_solve_realimag 1283426
RgM_solve 1289374
FpM_init 1296687
FpM_ker_i 1313470
FpM_init3 1313472
get_col 1314112
RgM_inv_upper 1637632
ZM_gauss 1776969
ZM_gauss_i 1776969
ZM_indexrank 1808567
RgM_solve_basecase 1846592
init_pivot_list 1996973
indexrank0 2012275
ZM_gauss_slice 2063843
ZM_gauss_worker 2063844
ZM_inv 2073785
set_pivot_fun 2112453
ZM_inv_i 2140780
ZM_rank 2254729
init_gauss 2463068
gauss_get_pivot_max 2672665
split_realimag 2703746
FpM_ratlift_parallel 2747052
RgM_inv_upper_ind 3307893
ZM_count_0_cols 4308869
ZM_pivots 4322412
split_realimag_col 4729787
_submul 18630496

Generated by: LCOV version 1.16