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 - ZV.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30074-db9b3c0519) Lines: 831 981 84.7 %
Date: 2025-03-13 08:38:27 Functions: 130 148 87.8 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Flc_lincomb1_inplace 25342998
QM_QC_mul 108730
QM_mul 478804
QM_sqr 600
RgM_check_ZM 557677
RgM_issquare 36
RgV_check_ZV 1218857
ZC_Q_mul 2337379
ZC_ZV_mul 0
ZC_Z_add 313178
ZC_Z_div 3150823
ZC_Z_divexact 4720199
ZC_Z_mul 29738485
ZC_Z_sub 0
ZC_add 22320401
ZC_add_i 30919762
ZC_copy 14922967
ZC_divexactu 1938
ZC_hnfdivrem 8736381
ZC_hnfdivrem_i 9214976
ZC_is_ei 149517
ZC_lincomb 28537858
ZC_lincomb1 13190696
ZC_lincomb1_inplace 53423498
ZC_lincomb1_inplace_i 62802264
ZC_lincomb_1 635055
ZC_modhnf 24
ZC_neg 5437388
ZC_reducemodlll 83938
ZC_reducemodmatrix 96199
ZC_reducemodmatrix_i 96199
ZC_sub 7507254
ZC_sub_i 7788500
ZC_z_mul 53318
ZMV_to_zmV 42
ZM_Q_mul 935967
ZM_ZC_mul 20692083
ZM_ZC_mul_i 64143720
ZM_ZV_divrem 0
ZM_Z_div 16554
ZM_Z_divexact 421162
ZM_Z_mul 2805015
ZM_add 723409
ZM_copy 560649
ZM_det_triangular 3388356
ZM_diag_mul 457872
ZM_divexactu 378
ZM_equal 2855134
ZM_equal0 62220
ZM_hnfdivrem 389607
ZM_hnfdivrem_i 389619
ZM_isdiagonal 477297
ZM_ishnf 644851
ZM_isidentity 563554
ZM_isscalar 137168
ZM_max_expi 0
ZM_max_expi_i 0
ZM_max_lg 19317
ZM_max_lg_i 22981835
ZM_modhnf 12
ZM_mul 17408464
ZM_mul_classical 11423390
ZM_mul_diag 18
ZM_mul_fast 703
ZM_mul_i 17762267
ZM_mul_slice 925
ZM_mul_sw 67291
ZM_mul_worker 925
ZM_multosym 0
ZM_nc_mul_i 0
ZM_neg 1476475
ZM_nm_mul 0
ZM_pow 0
ZM_powu 19548
ZM_reducemodlll 0
ZM_reducemodmatrix 194646
ZM_reducemodmatrix_i 194646
ZM_sqr 20916
ZM_sqr_fast 0
ZM_sqr_i 20916
ZM_sqr_slice 0
ZM_sqr_worker 0
ZM_sub 133330
ZM_supnorm 3639
ZM_to_zm 876
ZM_togglesign 0
ZM_transmul 1962
ZM_transmultosym 456175
ZM_zc_mul 14755614
ZM_zc_mul_i 16524656
ZM_zm_mul 836248
ZMrow_ZC_mul 115914442
ZMrow_ZC_mul_i 495951541
ZMrow_equal0 13927
ZRED 889754
ZV_ZM_mul 197682
ZV_ZV_divrem 6
ZV_abscmp 16920
ZV_cmp 2697965
ZV_content 254909
ZV_dotproduct 13885725
ZV_dotproduct_i 16444497
ZV_dotsquare 5710767
ZV_equal 251708
ZV_equal0 12337302
ZV_equal_lg 5340047
ZV_max_expi 0
ZV_max_expi_i 0
ZV_max_lg 9120
ZV_max_lg_i 93286699
ZV_neg_inplace 296151
ZV_prod 7568620
ZV_sum 66
ZV_to_nv 399975
ZV_togglesign 4316688
ZV_zc_mul 1911024
Z_ZC_sub 467417
ZincrementalGS 1020153
Zupdate_row 308947
_ZM_mul 240
_ZM_sqr 19998
_mulii 274369823
add_slices 538328
check_ZV 1655377
matmodhnf 42
matmodhnf_check 84
nm_Z_mul 0
subtract_slices 471037
sw_bound 11490681
vecsmall_prod 12595194
zmV_to_ZMV 108
zm_to_Flm 19452
zm_to_ZM 134200
zvV_equal 1404
zv_ZM_mul 1488
zv_abs 66
zv_content 15817127
zv_dotproduct 168342102
zv_equal 26514600
zv_equal0 19802911
zv_neg 44308
zv_neg_inplace 108
zv_prod 815001
zv_prod_Z 1598231
zv_sum 14178
zv_sumpart 0
zv_to_Flv 314268
zv_z_mul 24265

Generated by: LCOV version 1.16