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 - Flx.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.0 lcov report (development 29806-4d001396c7) Lines: 2402 2712 88.6 %
Date: 2024-12-22 09:08:28 Functions: 296 342 86.5 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl2_equal1 439719
Fl2_inv_pre 193115
Fl2_mul_pre 1915462
Fl2_norm_pre 126113
Fl2_pow_pre 657152
Fl2_sqr_pre 4819847
Fl2_sqrt_pre 67842
Fl2_sqrtn_pre 74707
Fl_Flxq_log 35431
Fl_Xp1_powu 0
Fl_to_Flx 19841661
Flm_to_FlxV 2296
FlvV_polint_tree 1386244
Flv_Flm_polint 101076
Flv_inv 623634
Flv_invVandermonde 152995
Flv_inv_i 635644
Flv_inv_indir 49733
Flv_inv_inplace 12017
Flv_inv_pre 10848
Flv_inv_pre_indir 18892737
Flv_inv_pre_inplace 18290734
Flv_polint 368290
Flv_prod 0
Flv_prod_pre 3255
Flv_producttree 624835
Flv_roots_to_pol 737495
Flv_to_Flx 26917599
FlxC_FlxqV_eval 0
FlxC_FlxqV_eval_pre 0
FlxC_Flxq_eval 0
FlxC_Flxq_eval_pre 0
FlxC_eval_powers_pre 251072
FlxC_neg 0
FlxC_sub 0
FlxC_to_ZXC 109566
FlxM_Flx_add_shallow 0
FlxM_Flx_mul2 24752
FlxM_eval_powers_pre 19452
FlxM_mul2 6517
FlxM_neg 0
FlxM_pack_ZM 58683
FlxM_pack_ZM_bits 119615
FlxM_sub 0
FlxM_to_FlxXV 0
FlxM_to_ZXM 4611
FlxT_red 297735
FlxV_Flc_mul 34482
FlxV_Flv_multieval 2471
FlxV_Flv_multieval_tree 2471
FlxV_Flx_fromdigits 0
FlxV_composedsum 28912
FlxV_prod 0
FlxV_red 0
FlxV_to_Flm 171701
FlxV_to_Flm_lg 13018537
FlxV_to_FlxX 396559
FlxV_to_ZXV 600398
FlxV_to_ZXV_inplace 2923722
Flx_Fl2_eval_pre 10402
Flx_Fl_add 9693849
Flx_Fl_mul 7116821
Flx_Fl_mul_pre 18798248
Flx_Fl_mul_to_monic 11945493
Flx_Fl_sub 151009
Flx_Flv_multieval 0
Flx_Flv_multieval_tree 665137
Flx_FlxM_qmul 6345
Flx_FlxqV_eval 5103
Flx_FlxqV_eval_pre 13216367
Flx_Flxq_eval 786382
Flx_Flxq_eval_pre 2625911
Flx_Frobenius 86483
Flx_Frobenius_pre 13665722
Flx_Laplace 27285
Flx_Newton 53995
Flx_add 63595624
Flx_addmulmul 386375
Flx_addshift 3678827
Flx_addspec 7159055
Flx_blocks 516155
Flx_blocks_Flm 13017325
Flx_composedprod 0
Flx_composedsum 27495
Flx_convol 0
Flx_deflate 419219
Flx_deriv 21063392
Flx_diff1 13447
Flx_digits 0
Flx_div_by_X_x 33017291
Flx_divrem 30353488
Flx_divrem_Barrett 604600
Flx_divrem_Barrettspec 904826
Flx_divrem_basecase 62463361
Flx_divrem_pre 79874094
Flx_double 2396554
Flx_equal 30285492
Flx_eval 20360308
Flx_eval2BILspec 581668
Flx_eval_powers_pre 43724656
Flx_eval_pre 100607161
Flx_extgcd 852664
Flx_extgcd_basecase 6737497
Flx_extgcd_halfgcd 136250
Flx_extgcd_pre 6737490
Flx_extresultant 53
Flx_extresultant_basecase 53
Flx_extresultant_pre 53
Flx_fromNewton 109346
Flx_gcd 32494506
Flx_gcd_basecase 82950974
Flx_gcd_pre 84592410
Flx_get_red 14031434
Flx_get_red_pre 102290192
Flx_halfgcd 0
Flx_halfgcd_all 154
Flx_halfgcd_all_i 1080745
Flx_halfgcd_all_pre 1080748
Flx_halfgcd_pre 845274
Flx_halfres_basecase 1087254
Flx_halfres_i 1106541
Flx_halfres_pre 1044
Flx_halfres_split 19282
Flx_halfres_update_pre 9405
Flx_halve 14265
Flx_inflate 158899
Flx_integ 0
Flx_integXn 422533
Flx_invBarrett 0
Flx_invBarrett_Newton 23116
Flx_invBarrett_basecase 134216
Flx_invBarrett_pre 158722
Flx_invLaplace 54237
Flx_is_l_pow 8368
Flx_is_smooth 74256
Flx_is_smooth_pre 118807
Flx_is_smooth_squarefree 127173
Flx_is_squarefree 8524768
Flx_lgrenormalizespec 2131429
Flx_matFrobenius 0
Flx_matFrobenius_pre 86451
Flx_mod_Xn1 30281
Flx_mod_Xnm1 5098038
Flx_mul 27226945
Flx_mul_pre 377274148
Flx_mulhigh_i 937504
Flx_mullimb 1148990060
Flx_mullimb_ok 3436005473
Flx_mulspec 382892181
Flx_mulspec_Kronecker 7263648
Flx_mulspec_basecase 345439822
Flx_mulspec_halfmulii 5454
Flx_mulspec_mulii 10031
Flx_mulspec_mulii_inflate 283389
Flx_mulspec_quartmulii 97113
Flx_neg 3452640
Flx_neg_inplace 1754809
Flx_negspec 3452632
Flx_normalize 62126021
Flx_powu 0
Flx_powu_pre 7957
Flx_recip 0
Flx_recipspec 7118036
Flx_red 1877448
Flx_rem 41752928
Flx_rem_basecase 794811975
Flx_rem_pre 919559799
Flx_renormalize 2132511319
Flx_rescale 1117
Flx_resultant 4654768
Flx_resultant_basecase_pre 10188196
Flx_resultant_pre 10190094
Flx_shift 26730775
Flx_shiftip 636928208
Flx_splitting 147724
Flx_sqr 356084
Flx_sqr_pre 282685891
Flx_sqrspec 282937739
Flx_sqrspec_Kronecker 678901
Flx_sqrspec_basecase 282687213
Flx_sqrspec_halfsqri 136
Flx_sqrspec_quartsqri 10221
Flx_sqrspec_sqri 2263
Flx_sqrspec_sqri_inflate 11501
Flx_sub 138096409
Flx_subspec 897401
Flx_to_Flv 63880426
Flx_to_FlxX 71517
Flx_to_ZX 37062631
Flx_to_ZX_inplace 36789086
Flx_to_int_halfspec 509899
Flx_to_int_quartspec 204447
Flx_translate1 16107
Flx_translate1_basecase 28201
Flx_triple 1024658
Flx_val 4153296
Flx_valrem 26290581
Flxn_div 55032
Flxn_div_pre 55054
Flxn_exp 0
Flxn_expint 109343
Flxn_inv 1030
Flxn_mul 75310
Flxn_mul_pre 5062095
Flxn_mulhigh 516056
Flxn_recip 217051
Flxn_red 6228958
Flxn_sqr 0
Flxn_sqr_pre 0
FlxqC_Flxq_mul 0
FlxqM_Flxq_mul 0
FlxqM_mul_Kronecker 89193
FlxqV_dotproduct 0
FlxqV_dotproduct_pre 113589
FlxqX_dotproduct 2456
Flxq_autpow 7
Flxq_autpow_msqr 20717
Flxq_autpow_pre 303789
Flxq_autpow_sqr 385187
Flxq_autpowers 1667
Flxq_autsum 0
Flxq_autsum_mul 588724
Flxq_autsum_pre 315758
Flxq_autsum_sqr 379861
Flxq_auttrace 0
Flxq_auttrace_mul 762602
Flxq_auttrace_pre 934865
Flxq_auttrace_sqr 635614
Flxq_charpoly 3632
Flxq_conjvec 20
Flxq_div 237395
Flxq_div_pre 2388876
Flxq_easylog 690978
Flxq_inv 345508
Flxq_inv_pre 4782970
Flxq_invsafe 656245
Flxq_invsafe_pre 5884858
Flxq_is2npower 0
Flxq_issquare 399374
Flxq_log 164469
Flxq_lroot 0
Flxq_lroot_fast 0
Flxq_lroot_fast_pre 113589
Flxq_lroot_pre 25053
Flxq_matrix_pow 399
Flxq_matrix_pow_pre 170494
Flxq_minpoly 44415
Flxq_minpoly_pre 783854
Flxq_mul 13180411
Flxq_mul_pre 195853960
Flxq_norm 438308
Flxq_order 96500
Flxq_pow 930721
Flxq_pow_Frobenius 28100394
Flxq_pow_init 0
Flxq_pow_init_pre 28
Flxq_pow_pre 28865511
Flxq_pow_table 0
Flxq_pow_table_pre 4392
Flxq_powers 232185
Flxq_powers_pre 22679322
Flxq_powu 486927
Flxq_powu_pre 23914651
Flxq_sqr 2746537
Flxq_sqr_pre 281730890
Flxq_sqrt 224361
Flxq_sqrt_pre 224361
Flxq_sqrtn 176625
Flxq_trace 4402
Flxq_transmul 4081155
Flxq_transmul_init 1690538
RgXV_to_FlxV 7
RgX_to_Flx 2826374
Rg_to_F2 1707095
Rg_to_Fl 74783750
Rg_to_Flxq 3565030
ZM_unpack_FlxqM 29345
ZM_unpack_FlxqM_bits 59848
ZXT_to_FlxT 3798444
ZXV_to_FlxV 0
ZX_to_Flx 167546248
Z_mod2BIL_Flx 294890
Z_mod2BIL_Flx_2 297820
Z_mod2BIL_Flx_3 0
Z_to_Flx 2673454
ZpX_invLaplace_init 497
_Fl2_mul 1887344
_Fl2_pow 657146
_Fl2_rand 111040
_Fl2_sqr 4819863
_Flx_add 578752
_Flx_composedsum 3826
_Flx_divrem 0
_Flx_mul 10481610
_Flx_sqr 0
_Flxq_equal0 165726
_Flxq_inv 18980
_Flxq_mul 154436369
_Flxq_neg 553759
_Flxq_one 22677927
_Flxq_pow 28093013
_Flxq_powu 68
_Flxq_powu_i 22871274
_Flxq_rand 329767
_Flxq_red 1773388
_Flxq_rmul 1577269
_Flxq_s 16890
_Flxq_sqr 274322960
bounded_order 849265
gener_Flxq 7187
get_Fl_threshold 2327577326
get_Flx_red 983633062
get_Flxq_field 73608
get_Flxq_star 431497
init_invlaplace 12514
int_to_Flx 12301
int_to_Flx_half 594101
int_to_Flx_quart 107334
kron_pack_Flx_spec 53832
kron_pack_Flx_spec_2 3389
kron_pack_Flx_spec_3 0
kron_pack_Flx_spec_bits 20821997
kron_pack_Flx_spec_half 857451
kron_unpack_Flx 42953
kron_unpack_Flx_2 2930
kron_unpack_Flx_3 0
kron_unpack_Flx_bits_narrow 5665429
kron_unpack_Flx_bits_wide 5541048
matJ2_FlxM 13
matid2_FlxM 895
maxbitcoeffpol 8365354
mkF2 7186918
monomial_Flx 912063
random_Flx 2663400
set_Flxq 73628
set_Flxq_pre 74621335
translate_basecase 41366
zero_FlxC 0
zero_FlxM 0
zl_Xp1_powu 12017
zlx_translate1 25259
zx_to_Flx 6065487

Generated by: LCOV version 1.16