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 30702-bddb8d6928) Lines: 2693 3077 87.5 %
Date: 2026-02-23 02:23:56 Functions: 295 316 93.4 %
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
FpM_ratlift_worker 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 6
F2xqM_det 6
F2xqM_image 6
F2xqM_indexrank 6
F2xqM_rank 6
F2xqM_suppl 6
FlxqM_indexrank 6
FqM_indexrank 6
image2 6
reducemodinvertible 6
FpM_FpC_invimage_gen 7
F2m_suppl 12
F2xqM_deplin 12
FlxqM_FlxqC_gauss 12
FlxqM_suppl 12
FpM_FpC_gauss 12
FqM_FqC_gauss 12
RgC_inflate 12
F2xqM_F2xqC_invimage 18
F2xqM_F2xqC_mul 18
F2xqM_gauss 18
F2xqM_gauss_pivot 18
F2xqM_invimage 18
F2xqM_ker 18
FlxqM_FlxqC_invimage 18
FlxqM_gauss 18
FlxqM_image 18
FqM_FqC_invimage 18
FqM_gauss 18
QM_rank 18
gen_get_suppl 18
gen_suppl 18
F2Ms_colelim 22
F2xqM_F2xqC_gauss 24
FlxqM_det 24
FlxqM_ker 24
RgM_RgC_invimage_FpC 24
RgM_deplin_i 24
RgM_div 24
RgM_indexrank_FpM 24
gen_matinv_upper 24
F2m_indexrank 28
F2xqM_inv 30
F2xqM_ker_i 30
FlxqM_FlxqC_mul 30
FlxqM_deplin 30
FlxqM_rank 30
FpM_gauss 30
FpM_invimage_gen 30
RgM_image_FqM 30
gen_matrank 30
FlxqM_invimage 36
FqM_invimage 36
RgM_det_FqM 36
RgM_inv_FqM 36
FqM_image 42
RgM_RgC_solve_FpC 42
RgM_deplin_FqM 42
RgM_rank_FqM 42
FlxqM_inv 48
FpM_rank 48
RgM_is_symmetric_real 51
eigen_err 51
FqM_FqC_mul 54
gen_invimage_CUP 54
FqM_det 60
FqM_rank 60
RgM_suppl_FpM 60
gen_matcolinvimage_i 61
gen_matinv_upper_ind 66
gen_matinvimage 66
F2xqM_gauss_gen 72
FqM_deplin 72
RgM_invimage_FpM 72
imagecompl 72
imagecompl_aux 72
FlxqM_gauss_i 78
RgM_ker_FqM 78
FqM_inv 84
RgM_solve_FpM 84
Flm_suppl 90
FqM_gauss_pivot_gen 90
RgM_deplin_FpM 90
gen_deplin_echelon 90
QM_deplin 102
FqM_ker_gen 108
RgM_rank_FpM 108
FqM_gauss_gen 114
RgMs_structelim_col 116
gen_det_CUP 120
gen_invimage 120
gen_colei 132
mateigen 135
RgM_suppl_fast 150
suppl 150
ZabM_pseudoinv 156
QM_det 173
matimage0 186
det_init_max 216
gen_det 250
FpM_det_gen 270
FlxqM_gauss_pivot 301
RgM_invimage 312
RgM_invimage_fast 312
RgM_rank_fast 318
rank 318
RgM_deplin 330
RgM_deplin_fast 330
deplin 330
coeff_det 348
gen_det_i 360
FqM_gauss_pivot 367
gauss 372
det_bareiss 396
RgM_image_FpM 450
gen_gauss_CUP 456
RgM_ker_FpM 462
gen_pivots_CUP 528
RgM_Fp_init3 552
det_develop 564
ZabM_ker 582
ZabM_ker_check 610
FlxqM_ker_i 678
gen_Gauss_pivot 952
FpM_gauss_pivot_gen 1047
gauss_pivot_ker 1101
ker_aux 1101
gen_ker 1105
QM_indexrank 1152
FlkM_ker 1157
FpXM_ratlift 1157
FqM_suppl 1191
F2xqM_mul 1242
row_count_non_zero 1248
col_count_non_zero 1260
RgM_det_FpM 1302
gen_pivots 1474
ZabM_inv 1632
ZabM_true_Hadamard 1632
RgM_inv_FpM 1758
ZabM_inv_slice 1806
ZabM_inv_worker 1806
gen_rsolve_upper_2 1874
gen_ker_echelon 2011
gen_matneg 2077
ZabM_indexrank 2130
FpM_ker_gen 2263
FpM_gauss_gen 2306
gen_gauss 2570
FqM_ker 2785
ZM_ker 2824
FqM_ker_i 2857
RgM_RgC_invimage_fast 3118
FlkM_adjoint 3125
gen_ker_i 3140
RgM_RgC_invimage 3208
gauss_get_pivot_NZ 3209
inverseimage 3350
gen_solve_upper_1 3440
RgM_Fp_init 3924
FpM_det 4014
QM_image 4104
FlmV_recover_pre 4282
ZM_pseudoinv 4385
RgM_image_fast 4638
image 4638
QM_image_shallow 4764
ZM_indeximage 4764
indeximage0 4764
gen_Gauss 4803
gen_rsolve_upper 4862
gen_lsolve_upper_2 5049
QM_gauss 5090
gen_lsolve_lower_unit_2 5121
vecnorml1 5172
QM_gauss_i 5372
QC_normalize 5378
_FqM_mul 5442
fill_wcol 5913
rem_singleton 6051
_FlxqM_mul 6692
closemodinvertible 7123
ZM_det2 7193
gen_CUP 9100
indexcompl 9917
gen_rsolve_lower_unit_2 10660
gen_zerocol 11211
gen_zeromat 11211
gen_lsolve_upper 11896
gen_colneg 12444
gen_lsolve_lower_unit 13595
gen_CUP_basecase 13599
RgM_Hadamard 14900
gen_echelon 14947
ZM_det_slice 15548
ZM_det_worker 15548
_gen_get_col 17566
indexrank_all 17973
_FpM_mul 19063
ZM_ker_chinese 21089
det0 22793
set_pivot_fun_all 23421
gen_rsolve_lower_unit 25761
RgM_det_fast 29213
ZM_ker_filter 32012
Flm_image 35406
perm_complete 35946
FpM_indexrank 36628
ZM_inv0 37431
gen_matcolmul 38929
matker0 39618
gen_matscalmul 39990
RgM_solve_fast 41860
detint 42826
_gen_addmul 46201
RgM_ker_fast 47968
ker 47968
parallelogramarea 48164
Flm_indexrank 49480
det_simple_gauss 50523
QM_ker 53556
gen_matsub 53847
QM_inv 55186
ZM_ker_i 55630
gen_matmul 64952
gen_matmul_classical 64952
gen_matmul_i 64952
RgM_indexrank_fast 71089
indexrank 71089
rem_col 71860
FqM_mul 73730
ZM_ker_slice 74739
ZM_ker_worker 74739
RgM_det2 80767
ZM_det3 85752
ZM_det 109091
det2 115774
FlxqM_mul 127501
ZM_detmult 141978
RgM_pivots 149188
gauss_get_pivot_padic 172919
det 211099
FpM_intersect_i 222585
FpM_suppl 230071
get_suppl 230492
init_suppl 230492
FpM_FpC_invimage 256344
gen_colscalmul 267663
FpM_image 284553
gen_matcolmul_i 295488
FpM_inv 303147
FpM_gauss_i 303189
image_from_pivot 320043
FpM_deplin 393420
gen_colsub 497063
RgM_inv 501619
RgM_inv_fast 501619
ZM_inv1 508733
FpM_gauss_pivot 551300
RgM_true_Hadamard 598593
ZM_inv2 626235
ZM_adj_ratlift 630405
can_ratlift 630405
ZM_inv_slice 659859
ZM_inv_worker 659859
FpM_ker 723721
RgM_RgC_solve_fast 1047014
get_col 1062122
RgM_solve_realimag 1080473
RgM_solve 1088874
FpM_init 1110495
FpM_init3 1119266
FpM_ker_i 1119266
RgM_inv_upper 1352478
ZM_gauss 1509359
ZM_gauss_i 1509359
ZM_indexrank 1536180
RgM_solve_basecase 1538754
init_pivot_list 1696717
indexrank0 1709854
ZM_inv 1715812
set_pivot_fun 1767290
ZM_inv_i 1770998
ZM_gauss_slice 1781037
ZM_gauss_worker 1781037
ZM_rank 1867873
init_gauss 2065459
gauss_get_pivot_max 2192820
split_realimag 2279114
FpM_ratlift_parallel 2339415
RgM_inv_upper_ind 2764490
ZM_count_0_cols 3600706
ZM_pivots 3612556
split_realimag_col 3980054
_submul 15594142

Generated by: LCOV version 1.16