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 30072-2ccdc2326c) Lines: 2702 3097 87.2 %
Date: 2025-03-12 09:19:58 Functions: 296 317 93.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
F2Ms_colelim 46
F2m_image 7
F2m_indexrank 53
F2m_suppl 14
F2xqM_F2xqC_gauss 14
F2xqM_F2xqC_invimage 21
F2xqM_F2xqC_mul 21
F2xqM_deplin 14
F2xqM_det 7
F2xqM_gauss 14
F2xqM_gauss_gen 63
F2xqM_gauss_pivot 21
F2xqM_image 7
F2xqM_indexrank 7
F2xqM_inv 35
F2xqM_invimage 21
F2xqM_ker 7
F2xqM_ker_i 21
F2xqM_mul 1449
F2xqM_rank 7
F2xqM_suppl 7
FlkM_adjoint 3209
FlkM_inv 0
FlkM_ker 1276
FlmV_recover_pre 4485
Flm_image 40859
Flm_indexrank 58296
Flm_suppl 105
FlxqM_FlxqC_gauss 14
FlxqM_FlxqC_invimage 21
FlxqM_FlxqC_mul 35
FlxqM_deplin 35
FlxqM_det 28
FlxqM_gauss 21
FlxqM_gauss_i 91
FlxqM_gauss_pivot 361
FlxqM_image 21
FlxqM_indexrank 7
FlxqM_inv 56
FlxqM_invimage 42
FlxqM_ker 28
FlxqM_ker_i 812
FlxqM_mul 148988
FlxqM_rank 35
FlxqM_suppl 14
FpM_FpC_gauss 14
FpM_FpC_invimage 297760
FpM_FpC_invimage_gen 8
FpM_deplin 456642
FpM_det 4683
FpM_det_gen 315
FpM_gauss 35
FpM_gauss_gen 2747
FpM_gauss_i 351992
FpM_gauss_pivot 640983
FpM_gauss_pivot_gen 1214
FpM_image 330774
FpM_indexrank 42726
FpM_init 1290315
FpM_init3 1309238
FpM_intersect 0
FpM_intersect_i 264032
FpM_inv 351943
FpM_invimage 0
FpM_invimage_gen 35
FpM_ker 849949
FpM_ker_gen 2642
FpM_ker_i 1309236
FpM_rank 56
FpM_ratlift_parallel 2738756
FpM_ratlift_worker 76806
FpM_suppl 267431
FpXM_ratlift 1276
FqM_FqC_gauss 14
FqM_FqC_invimage 21
FqM_FqC_mul 63
FqM_deplin 84
FqM_det 70
FqM_gauss 21
FqM_gauss_gen 133
FqM_gauss_pivot 438
FqM_gauss_pivot_gen 105
FqM_image 49
FqM_indexrank 7
FqM_inv 98
FqM_invimage 42
FqM_ker 3451
FqM_ker_gen 126
FqM_ker_i 3535
FqM_mul 86016
FqM_rank 70
FqM_suppl 1481
QC_normalize 6356
QM_deplin 119
QM_det 203
QM_gauss 6020
QM_gauss_i 6349
QM_image 5411
QM_image_shallow 6181
QM_indexrank 1344
QM_inv 65290
QM_ker 18235
QM_rank 21
RgC_inflate 14
RgM_Fp_init 4599
RgM_Fp_init3 658
RgM_Hadamard 20017
RgM_RgC_invimage 3759
RgM_RgC_invimage_FpC 28
RgM_RgC_invimage_fast 3654
RgM_RgC_solve_FpC 63
RgM_RgC_solve_fast 1177491
RgM_deplin 385
RgM_deplin_FpM 105
RgM_deplin_FqM 49
RgM_deplin_fast 385
RgM_deplin_i 28
RgM_det2 94311
RgM_det_FpM 1519
RgM_det_FqM 42
RgM_det_fast 33907
RgM_div 28
RgM_image_FpM 525
RgM_image_FqM 35
RgM_image_fast 6034
RgM_indexrank_FpM 28
RgM_indexrank_FqM 0
RgM_indexrank_fast 77599
RgM_inv 526388
RgM_inv_FpM 2051
RgM_inv_FqM 42
RgM_inv_fast 526387
RgM_inv_upper 1617562
RgM_inv_upper_ind 3231127
RgM_invimage 364
RgM_invimage_FpM 84
RgM_invimage_fast 364
RgM_is_symmetric_cx 53
RgM_ker_FpM 553
RgM_ker_FqM 91
RgM_ker_fast 10668
RgM_pivots 167779
RgM_rank_FpM 126
RgM_rank_FqM 49
RgM_rank_fast 371
RgM_solve 1226295
RgM_solve_FpM 105
RgM_solve_basecase 1692401
RgM_solve_fast 48804
RgM_solve_realimag 1215558
RgM_suppl_FpM 70
RgM_suppl_fast 175
RgM_true_Hadamard 720993
RgMs_structelim 0
RgMs_structelim_col 147
RgV_deplin 0
ZM_adj_ratlift 758901
ZM_count_0_cols 4215318
ZM_det 130765
ZM_det2 8694
ZM_det3 100472
ZM_det_slice 20872
ZM_det_worker 20872
ZM_detmult 166038
ZM_gauss 1711090
ZM_gauss_i 1711090
ZM_gauss_slice 2018851
ZM_gauss_worker 2018856
ZM_imagecompl 0
ZM_indeximage 6181
ZM_indexrank 1742422
ZM_inv 2069367
ZM_inv0 43533
ZM_inv1 644431
ZM_inv2 725696
ZM_inv_i 2134657
ZM_inv_ratlift 0
ZM_inv_slice 794471
ZM_inv_worker 794471
ZM_ker 49269
ZM_ker_chinese 69755
ZM_ker_filter 105428
ZM_ker_i 66629
ZM_ker_slice 133560
ZM_ker_worker 133560
ZM_pivots 4229006
ZM_pseudoinv 5026
ZM_rank 2226296
ZabM_indexrank 2387
ZabM_inv 1827
ZabM_inv_ratlift 0
ZabM_inv_slice 1985
ZabM_inv_worker 1985
ZabM_ker 623
ZabM_ker_check 655
ZabM_pseudoinv 140
ZabM_true_Hadamard 1827
_F2xqM_mul 0
_FlxqM_mul 7924
_FpM_mul 22487
_FqM_mul 6349
_copy 0
_gen_addmul 57294
_gen_get_col 21479
_submul 18303488
add_slices 0
can_ratlift 766160
closemodinvertible 9119
coeff_det 406
col_count_non_zero 1470
deplin 385
det 246233
det0 26593
det2 134607
det_bareiss 462
det_develop 658
det_init_max 252
det_simple_gauss 58263
detint 49964
eigen 0
eigen_err 53
fill_wcol 7446
gauss 434
gauss_get_pivot_NZ 3752
gauss_get_pivot_max 2593411
gauss_get_pivot_padic 201820
gauss_pivot_ker 1271
gen_CUP 10598
gen_CUP_basecase 16007
gen_Gauss 5814
gen_Gauss_pivot 1119
gen_colei 154
gen_colneg 14704
gen_colscalmul 310391
gen_colsub 574403
gen_deplin_echelon 105
gen_det 294
gen_det_CUP 140
gen_det_i 420
gen_echelon 17685
gen_gauss 3034
gen_gauss_CUP 559
gen_gerepile_gauss_ker 0
gen_get_suppl 21
gen_invimage 140
gen_invimage_CUP 63
gen_ker 1271
gen_ker_echelon 2373
gen_ker_i 3672
gen_lsolve_lower_unit 16025
gen_lsolve_lower_unit_2 6065
gen_lsolve_upper 13882
gen_lsolve_upper_2 5894
gen_matcolinvimage 0
gen_matcolinvimage_i 71
gen_matcolmul 48648
gen_matcolmul_i 350531
gen_matinv_upper 28
gen_matinv_upper_ind 77
gen_matinvimage 77
gen_matmul 75983
gen_matmul_classical 75983
gen_matmul_i 75983
gen_matmul_sw 0
gen_matneg 2450
gen_matrank 35
gen_matscalmul 47140
gen_matsub 63502
gen_pivots 1722
gen_pivots_CUP 610
gen_rsolve_lower_unit 30422
gen_rsolve_lower_unit_2 12590
gen_rsolve_upper 5840
gen_rsolve_upper_2 2256
gen_solve_upper_1 4035
gen_suppl 21
gen_zerocol 13108
gen_zeromat 13108
gerepile_gauss 0
gerepile_gauss_ker 0
gerepile_mat 0
get_col 1265872
get_suppl 267929
image 6034
image2 7
image_from_pivot 371731
imagecompl 84
imagecompl_aux 84
indexcompl 12199
indeximage0 6181
indexrank 77599
indexrank0 1941131
indexrank_all 21816
init_gauss 2377158
init_pivot_list 1925583
init_suppl 267932
inverseimage 3920
ker 10668
ker_aux 1271
mateigen 144
matimage0 217
matker0 46221
parallelogramarea 64380
perm_complete 43632
rank 371
reducemodinvertible 7
reducemodlll 0
rem_col 95965
rem_singleton 7639
row_count_non_zero 1456
set_pivot_fun 1908256
set_pivot_fun_all 26820
split_realimag 2570182
split_realimag_col 4517161
subtract_slices 0
suppl 175
vecnorml1 5509

Generated by: LCOV version 1.16