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

Generated by: LCOV version 1.16