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 - modules - algebras.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30556-bb9f5f8fc8) Lines: 3957 3986 99.3 %
Date: 2025-11-25 09:20:50 Functions: 344 345 99.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
CC_to_HC 98
CM_to_HM 49
C_charpoly 35
C_divl_i 112
C_inv 140
C_norm 42
C_random 182
C_tomatrix 84
C_trace 35
Flm_invimage_init 8655
Flm_invimage_pre 420059
HC_to_CC 140
HM_to_CM 70
H_add 17745
H_charpoly 98
H_compo 205639
H_divl_i 203
H_inv 259
H_invol 98
H_model 462910
H_model0 462910
H_mul 108129
H_neg 98
H_norm 434
H_poleval 84
H_random 980
H_sqr 329
H_tomatrix 2457
H_trace 567
QM_invimZ 14
QM_invimZ_mod 3535
R_charpoly 35
R_norm 42
R_random 4466
R_tomatrix 42
R_trace 35
RgC_col2mat 1708
RgC_contract 19348
RgM_contract 4298
RgM_mat2col 50554
Rgmultable 476
Z_easyfactor 12002
_mul 50473
_sqr 121780
_tablemul 645582
_tablemul_Fp 295125
_tablemul_ej 111811
_tablemul_ej_Fl 420059
_tablemul_ej_Fp 242039
alC_add_i 756
alC_sub_i 210
alM_add 406
alM_alC_mul_i 54502
alM_mul 25627
alM_sub 126
alMrow_alC_mul_i 119651
algZmultable 14592
alg_centralproj 12078
alg_change_overorder_shallow 3231
alg_complete 0
alg_complete0 344
alg_csa_table 294
alg_cyclic 980
alg_decompose 28379
alg_decompose_from_facto 9882
alg_decompose_total 23906
alg_finite_csa_split 6748
alg_get_absdim 2805354
alg_get_abssplitting 99352
alg_get_aut 1121
alg_get_auts 19388
alg_get_b 18477
alg_get_basis 3297
alg_get_center 538721
alg_get_char 12981045
alg_get_degree 2990791
alg_get_dim 411148
alg_get_hasse_f 4557
alg_get_hasse_i 2163
alg_get_invbasis 86128
alg_get_invol 3476
alg_get_multable 3986933
alg_get_relmultable 394009
alg_get_splitpol 301
alg_get_splittingbasis 4347
alg_get_splittingbasisinv 4347
alg_get_splittingdata 84
alg_get_splittingfield 28870724
alg_get_tracebasis 510414
alg_hasse 497
alg_hilbert 658
alg_hilbert_asquare 28
alg_idempotent 5285
alg_insert_quatconj 1002
alg_is_asq 1183
alg_matrix 147
alg_maximal 224
alg_maximal_primes 1387
alg_model 2141203
alg_model0 2141203
alg_ordermodp 13769
alg_pmaximal 3079
alg_quatramif 77
alg_quotient 12618
alg_quotient0 37195
alg_subalg 14572
alg_type 11100020
algabstrace 510568
algadd 54999
algalgmul 2345
algalgmul_csa 686
algalgmul_cyc 1659
algalgmultable 17511
algalgmultable_csa 2170
algalgmultable_cyc 15670
algalgtobasis 88046
algalgtobasis_mat 182
algalgtonat 86044
algalgtonat_csa 16163
algalgtonat_cyc 69881
algaut 63
algb 91
algbasis 154
algbasis2mat 294
algbasischarpoly 32246
algbasismul 940021
algbasismultable 358470
algbasismultable_Flm 45309
algbasisrightmultable 41741
algbasissplittingmatrix_csa 4347
algbasistoalg 3409
algbasistoalg_mat 119
algbasistoquat 126
algcenter 12509
algcenter_p_projs 6282
algcenter_prad 6282
algcenter_precompute 3079
algchar 112
algcharpoly 32435
algcomputehasse 966
algdegree 679
algdim 6692
algdisc 364
algdisc_i 567
algdivl 889
algdivl_i 3199
algdivl_i2 1015
algdivr 469
algeichlerbasis 2338
algeltfromnf 5614
algeltfromnf_hnf 6282
algeltfromnf_i 35735
alggroup 329
alggroupcenter 329
alghasse 343
alghasse_0 2422
alghasse_emb 497
alghasse_pr 1841
alghassef 336
alghassei 238
algindex 2233
alginit 1967
alginv 1330
alginv_i 2989
alginvbasis 84
alginvol 308
algisassociative 532
algiscommutative 392
algisdivision 287
algisdivl 126
algisinv 1659
algisisom 245
algisquatalg 98
algisramified 1428
algissemisimple 392
algissimilar_i 154
algissimple 301
algissplit 1694
alglat_get_primbasis 251664
alglat_get_scalar 297255
alglatadd 7588
alglataddinter 11697
alglatcontains 17528
alglatelement 8778
alglathnf 53725
alglatindex 5271
alglatinter 4109
alglatlefttransporter 1778
alglatmul 45612
alglatrighttransporter 1771
alglatsubset 33733
alglattransporter_i 3535
algleftmultable 27482
algleftmultable_mat 910
algleftordermodp 7781
algmakeintegral 42
algmat2basis 23961
algmat_tomatrix 728
algmatbasis_ei 23884
algmatid 21
algmodpr 1841
algmodpr_get_T 3801
algmodpr_get_ff 1715
algmodpr_get_k 5243
algmodpr_get_lift 3241
algmodpr_get_m 2219
algmodpr_get_p 3948
algmodpr_get_pr 3948
algmodpr_get_proj 1708
algmodpr_get_tau 1729
algmodpr_i 1729
algmodpr_integral 1708
algmodpr_mat 28
algmodprinit 3031
algmodprlift 301
algmodprlift_i 511
algmtK2Z 14592
algmtK2Z_csa 1687
algmtK2Z_cyc 12905
algmul 943604
algmultable 308
algnatmultable 1576
algnattoalg 17735
algnattoalg_csa 2135
algnattoalg_cyc 15600
algneg 245
algnewprec 84
algnewprec_shallow 84
algnorm 1309
algpdecompose0 4491
algpdecompose_i 1412
algpoleval 30392
algpow 21843
algpradical_i 6282
algprimesubalg 9110
algquattobasis 280
algradical 14381
algramifiedplaces 364
algrandom 20104
algreal_dim 259
algredcharpoly 553
algredcharpoly_i 546
algredtrace 1512
algrelmultable 70
algrightmultable 77
algsimpledec 2968
algsimpledec_ss 9215
algskolemnoether 112
algsplit 3766
algsplittingdata 84
algsplittingfield 161
algsqr 124174
algsub 1127
algsubalg 84
algtablecenter 33011
algtableinit 6461
algtableinit_i 59348
algtensor 77
algtomatrix 28931
algtrace 2702
algtrace_mat 469
algtracebasis 64141
algtracei 45309
algtracematrix 14857
algtype 2296
allauts 1310
backtrackfacto 1716
bnfgwgeneric 196
bnrgwsearch 420
change_Rgmultable 56
check_mt 59390
check_mt_noid 59915
check_relmt 294
checkalg 1666663
checkalg_i 1539361
checkalgmodpr 2135
checkalgmodpr_i 2135
checkalgx 2141014
checkhasse 2115
checklat 187334
checklat_i 187334
clean_factor 344
cmp_algebra 14530
colconcat 688
computecnd 344
computesplitting 266
conjclasses_algcenter 847
cyclicrelfrob 3122
cyclicrelfrob0 406
descend 4298
descend_i 4298
dividesmod 140
eichleridempotent 2737
eichlerprimepower 546
eichlerprimepower_i 2737
elementabsmultable 156487
elementabsmultable_Fp 201983
elementabsmultable_Z 358470
elementmultable 2170
extraprime 84
factoredextchinese 1372
factoredextchinesetest 1716
findmaximalsubfield 266
frobeniusform 266
genefrob 140
get_phi0 420
get_vecsmall 1043
groupelts_algebra 294
hasseconvert 1400
hassecoprime 483
hassereduce 750
image_keep_first 38001
indexfromhasse 2261
is_place_emb 546
ismaximalsubfield 630
list_to_regular_rep 294
localcomplete 77
localextdeg 1603
localextdegell 175
localhasse 1099
mat2col 28322
mat_algeltfromnf 2730
matrix_perm 3857
mattocol 73795
mk_C 21
mk_H 56
mk_R 28
nextgen 77
nfgrunwaldwang 567
nfgwkummer 273
nfmakecoprime 1654
normfact_is_partial 154
out_decompose 19687
prepare_lat 11683
prepare_multipliers 11683
primlat 64351
randcol 7
random_pm1 15286
rnfcycaut 344
subcycloindep 140
testsplits 820
try_descend 4725
try_fact 18393
try_split 12894
uispow2 364

Generated by: LCOV version 1.16