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

Generated by: LCOV version 1.16