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 30702-bddb8d6928) Lines: 3960 3986 99.3 %
Date: 2026-02-23 02:23:56 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 84
CM_to_HM 42
C_charpoly 30
C_divl_i 96
C_inv 120
C_norm 36
C_random 156
C_tomatrix 72
C_trace 30
Flm_invimage_init 7644
Flm_invimage_pre 531134
HC_to_CC 120
HM_to_CM 60
H_add 15210
H_charpoly 84
H_compo 176262
H_divl_i 174
H_inv 222
H_invol 84
H_model 396780
H_model0 396780
H_mul 92682
H_neg 84
H_norm 372
H_poleval 72
H_random 840
H_sqr 282
H_tomatrix 2106
H_trace 486
QM_invimZ 12
QM_invimZ_mod 3030
R_charpoly 30
R_norm 36
R_random 3828
R_tomatrix 36
R_trace 30
RgC_col2mat 1464
RgC_contract 16068
RgM_contract 3570
RgM_mat2col 42294
Rgmultable 408
Z_easyfactor 10400
_mul 44726
_sqr 106856
_tablemul 447276
_tablemul_Fp 256932
_tablemul_ej 95838
_tablemul_ej_Fl 531134
_tablemul_ej_Fp 207462
alC_add_i 648
alC_sub_i 180
alM_add 348
alM_alC_mul_i 46716
alM_mul 21966
alM_sub 108
alMrow_alC_mul_i 102558
algZmultable 13788
alg_centralproj 10729
alg_change_overorder_shallow 3027
alg_complete 0
alg_complete0 354
alg_csa_table 252
alg_cyclic 846
alg_decompose 24252
alg_decompose_from_facto 8510
alg_decompose_total 20532
alg_finite_csa_split 5580
alg_get_absdim 2196207
alg_get_abssplitting 88268
alg_get_aut 1002
alg_get_auts 17946
alg_get_b 17136
alg_get_basis 2826
alg_get_center 465054
alg_get_char 9987791
alg_get_degree 2138823
alg_get_dim 352006
alg_get_hasse_f 3912
alg_get_hasse_i 1896
alg_get_invbasis 74366
alg_get_invol 3237
alg_get_multable 3220601
alg_get_relmultable 337722
alg_get_splitpol 270
alg_get_splittingbasis 3726
alg_get_splittingbasisinv 3726
alg_get_splittingdata 72
alg_get_splittingfield 22136288
alg_get_tracebasis 559206
alg_hasse 450
alg_hilbert 564
alg_hilbert_asquare 24
alg_idempotent 4326
alg_insert_quatconj 888
alg_is_asq 1014
alg_matrix 126
alg_maximal 192
alg_maximal_primes 1236
alg_model 1625316
alg_model0 1625316
alg_ordermodp 12351
alg_pmaximal 2804
alg_quatramif 66
alg_quotient 10489
alg_quotient0 32559
alg_subalg 12416
alg_type 8578172
algabstrace 559338
algadd 47142
algalgmul 2010
algalgmul_csa 588
algalgmul_cyc 1422
algalgmultable 16290
algalgmultable_csa 1860
algalgmultable_cyc 14712
algalgtobasis 76010
algalgtobasis_mat 156
algalgtonat 74294
algalgtonat_csa 13854
algalgtonat_cyc 60440
algaut 54
algb 78
algbasis 132
algbasis2mat 252
algbasischarpoly 27374
algbasismul 703620
algbasismultable 315413
algbasismultable_Flm 44052
algbasisrightmultable 35370
algbasissplittingmatrix_csa 3726
algbasistoalg 2922
algbasistoalg_mat 102
algbasistoquat 108
algcenter 10110
algcenter_p_projs 5807
algcenter_prad 5807
algcenter_precompute 2804
algchar 96
algcharpoly 27536
algcomputehasse 834
algdegree 582
algdim 5328
algdisc 312
algdisc_i 486
algdivl 762
algdivl_i 2742
algdivl_i2 870
algdivr 402
algeichlerbasis 1800
algeltfromnf 4404
algeltfromnf_hnf 5807
algeltfromnf_i 31172
alggroup 282
alggroupcenter 282
alghasse 294
alghasse_0 2064
alghasse_emb 438
alghasse_pr 1554
alghassef 312
alghassei 228
algindex 1878
alginit 1710
alginv 1140
alginv_i 2562
alginvbasis 72
alginvol 264
algisassociative 456
algiscommutative 336
algisdivision 246
algisdivl 108
algisinv 1422
algisisom 222
algisquatalg 84
algisramified 1188
algissemisimple 336
algissimilar_i 144
algissimple 258
algissplit 1416
alglat_get_primbasis 215304
alglat_get_scalar 254382
alglatadd 6504
alglataddinter 10026
alglatcontains 15024
alglatelement 7524
alglathnf 45846
alglatindex 4518
alglatinter 3522
alglatlefttransporter 1524
alglatmul 39096
alglatrighttransporter 1518
alglatsubset 28710
alglattransporter_i 3030
algleftmultable 20280
algleftmultable_mat 780
algleftordermodp 7379
algmakeintegral 36
algmat2basis 20538
algmat_tomatrix 624
algmatbasis_ei 20472
algmatid 18
algmodpr 1578
algmodpr_get_T 3258
algmodpr_get_ff 1470
algmodpr_get_k 4290
algmodpr_get_lift 2574
algmodpr_get_m 1902
algmodpr_get_p 3384
algmodpr_get_pr 3384
algmodpr_get_proj 1464
algmodpr_get_tau 1482
algmodpr_i 1482
algmodpr_integral 1464
algmodpr_mat 24
algmodprinit 2394
algmodprlift 258
algmodprlift_i 438
algmtK2Z 13788
algmtK2Z_csa 1446
algmtK2Z_cyc 12342
algmul 704422
algmultable 264
algnatmultable 1416
algnattoalg 16482
algnattoalg_csa 1830
algnattoalg_cyc 14652
algneg 210
algnewprec 72
algnewprec_shallow 72
algnorm 1122
algpdecompose0 4180
algpdecompose_i 1376
algpoleval 25196
algpow 19304
algpradical_i 5807
algprimesubalg 8208
algquattobasis 240
algradical 12656
algramifiedplaces 312
algrandom 17232
algreal_dim 222
algredcharpoly 474
algredcharpoly_i 468
algredtrace 1296
algrelmultable 60
algrightmultable 66
algsimpledec 2340
algsimpledec_ss 8298
algskolemnoether 96
algsplit 3228
algsplittingdata 72
algsplittingfield 138
algsqr 108908
algsub 966
algsubalg 72
algtablecenter 28288
algtableinit 5334
algtableinit_i 51269
algtensor 72
algtomatrix 21522
algtrace 2316
algtrace_mat 402
algtracebasis 55700
algtracei 44052
algtracematrix 13064
algtype 1932
allauts 1188
backtrackfacto 1566
bnfgwgeneric 180
bnrgwsearch 378
change_Rgmultable 48
check_mt 51305
check_mt_noid 51755
check_relmt 252
checkalg 1319058
checkalg_i 1209906
checkalgmodpr 1830
checkalgmodpr_i 1830
checkalgx 1625154
checkhasse 1932
checklat 160164
checklat_i 160164
clean_factor 354
cmp_algebra 12517
colconcat 708
computecnd 354
computesplitting 228
conjclasses_algcenter 726
cyclicrelfrob 2837
cyclicrelfrob0 468
descend 3570
descend_i 3570
dividesmod 120
eichleridempotent 2142
eichlerprimepower 468
eichlerprimepower_i 2142
elementabsmultable 136387
elementabsmultable_Fp 179026
elementabsmultable_Z 315413
elementmultable 1860
extraprime 72
factoredextchinese 1212
factoredextchinesetest 1566
findmaximalsubfield 228
frobeniusform 228
genefrob 120
get_phi0 378
get_vecsmall 954
groupelts_algebra 252
hasseconvert 1272
hassecoprime 438
hassereduce 732
image_keep_first 33502
indexfromhasse 1902
is_place_emb 480
ismaximalsubfield 540
list_to_regular_rep 252
localcomplete 66
localextdeg 1392
localextdegell 150
localhasse 960
mat2col 24276
mat_algeltfromnf 2136
matrix_perm 3306
mattocol 80006
mk_C 18
mk_H 48
mk_R 24
nextgen 66
nfgrunwaldwang 516
nfgwkummer 252
nfmakecoprime 1542
normfact_is_partial 144
out_decompose 16954
prepare_lat 10014
prepare_multipliers 10014
primlat 55158
randcol 6
random_pm1 13028
rnfcycaut 354
subcycloindep 120
testsplits 779
try_descend 3936
try_fact 15638
try_split 10914
uispow2 330

Generated by: LCOV version 1.16