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 29815-a300ec5c34) Lines: 2454 2766 88.7 %
Date: 2024-12-25 09:08:54 Functions: 299 345 86.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl2_equal1 439530
Fl2_inv_pre 192785
Fl2_mul_pre 1915371
Fl2_norm_pre 125912
Fl2_pow_pre 656670
Fl2_sqr_pre 4820781
Fl2_sqrt_pre 67676
Fl2_sqrtn_pre 74627
Fl_Flxq_log 35470
Fl_Xp1_powu 0
Fl_to_Flx 19865685
Flm_to_FlxV 2296
FlvV_polint_tree 1386314
Flv_Flm_polint 101075
Flv_inv 623636
Flv_invVandermonde 152995
Flv_inv_i 635650
Flv_inv_indir 49733
Flv_inv_inplace 12017
Flv_inv_pre 10850
Flv_inv_pre_indir 18950538
Flv_inv_pre_inplace 18333211
Flv_polint 368290
Flv_prod 0
Flv_prod_pre 3255
Flv_producttree 624839
Flv_roots_to_pol 737449
Flv_to_Flx 25185399
FlxC_FlxqV_eval 0
FlxC_FlxqV_eval_pre 0
FlxC_Flxq_eval 0
FlxC_Flxq_eval_pre 0
FlxC_eval_powers_pre 251066
FlxC_neg 0
FlxC_sub 0
FlxC_to_ZXC 109566
FlxM_Flx_add_shallow 0
FlxM_Flx_mul2 24751
FlxM_eval_powers_pre 19452
FlxM_mul2 6517
FlxM_neg 0
FlxM_pack_ZM 58981
FlxM_pack_ZM_bits 117719
FlxM_sub 0
FlxM_to_FlxXV 0
FlxM_to_ZXM 4611
FlxT_red 295651
FlxV_Flc_mul 34482
FlxV_Flv_multieval 2471
FlxV_Flv_multieval_tree 2471
FlxV_Flx_fromdigits 0
FlxV_composedsum 28908
FlxV_prod 0
FlxV_red 0
FlxV_to_Flm 171815
FlxV_to_Flm_lg 12769040
FlxV_to_FlxX 397971
FlxV_to_ZXV 600284
FlxV_to_ZXV_inplace 2923387
Flx_Fl2_eval_pre 10402
Flx_Fl_add 9685304
Flx_Fl_mul 7262120
Flx_Fl_mul_pre 18307498
Flx_Fl_mul_to_monic 11949427
Flx_Fl_sub 150912
Flx_Flv_multieval 0
Flx_Flv_multieval_tree 665135
Flx_FlxM_qmul 6345
Flx_FlxqV_eval 5103
Flx_FlxqV_eval_pre 12967309
Flx_Flxq_eval 786201
Flx_Flxq_eval_pre 2393911
Flx_Frobenius 86498
Flx_Frobenius_pre 13660375
Flx_Laplace 27272
Flx_Newton 53982
Flx_add 62905850
Flx_addmulmul 416898
Flx_addshift 3660078
Flx_addspec 7121686
Flx_blocks 516040
Flx_blocks_Flm 12767988
Flx_composedprod 0
Flx_composedsum 27491
Flx_convol 0
Flx_deflate 419043
Flx_deriv 21065791
Flx_diff1 13447
Flx_digits 0
Flx_div_by_X_x 33025288
Flx_divrem 30255820
Flx_divrem_Barrett 604485
Flx_divrem_Barrettspec 905247
Flx_divrem_basecase 61681347
Flx_divrem_pre 79101367
Flx_double 2443754
Flx_equal 30555929
Flx_eval 20395632
Flx_eval2BILspec 581756
Flx_eval_powers_pre 43792348
Flx_eval_pre 100660928
Flx_extgcd 852878
Flx_extgcd_basecase 6336028
Flx_extgcd_halfgcd 147557
Flx_extgcd_pre 6336020
Flx_extresultant 53
Flx_extresultant_basecase 53
Flx_extresultant_pre 53
Flx_fromNewton 109335
Flx_gcd 32407597
Flx_gcd_basecase 82868256
Flx_gcd_pre 84499091
Flx_get_red 14230305
Flx_get_red_pre 100035243
Flx_halfgcd 0
Flx_halfgcd_all 154
Flx_halfgcd_all_i 1102501
Flx_halfgcd_all_pre 1102507
Flx_halfgcd_pre 845896
Flx_halfres_basecase 1109015
Flx_halfres_i 1128298
Flx_halfres_pre 1044
Flx_halfres_split 19282
Flx_halfres_update_pre 9405
Flx_halve 14229
Flx_inflate 158640
Flx_integ 0
Flx_integXn 422496
Flx_invBarrett 0
Flx_invBarrett_Newton 23113
Flx_invBarrett_basecase 134233
Flx_invBarrett_pre 158651
Flx_invLaplace 54221
Flx_is_l_pow 8401
Flx_is_smooth 74256
Flx_is_smooth_pre 118831
Flx_is_smooth_squarefree 127206
Flx_is_squarefree 8526768
Flx_lgrenormalizespec 2131348
Flx_matFrobenius 0
Flx_matFrobenius_pre 86528
Flx_mod_Xn1 30304
Flx_mod_Xnm1 5098119
Flx_mul 27655475
Flx_mul_pre 376459170
Flx_mulhigh_i 937264
Flx_mullimb 1150170735
Flx_mullimb_ok 3434821401
Flx_mulspec 381990186
Flx_mulspec_Kronecker 7218473
Flx_mulspec_basecase 344799867
Flx_mulspec_halfmulii 5454
Flx_mulspec_mulii 10030
Flx_mulspec_mulii_inflate 283433
Flx_mulspec_quartmulii 97128
Flx_neg 3451125
Flx_neg_inplace 1745517
Flx_negspec 3451119
Flx_normalize 62131237
Flx_powu 0
Flx_powu_pre 7889
Flx_recip 0
Flx_recipspec 7121918
Flx_red 1875916
Flx_rem 41766142
Flx_rem_basecase 794769266
Flx_rem_pre 918431164
Flx_renormalize 2125531201
Flx_rescale 1117
Flx_resultant 4659574
Flx_resultant_basecase_pre 10193654
Flx_resultant_pre 10195561
Flx_shift 26733084
Flx_shiftip 634785676
Flx_splitting 147496
Flx_sqr 356083
Flx_sqr_pre 281728511
Flx_sqrspec 281938298
Flx_sqrspec_Kronecker 683836
Flx_sqrspec_basecase 281493855
Flx_sqrspec_halfsqri 136
Flx_sqrspec_quartsqri 10221
Flx_sqrspec_sqri 2263
Flx_sqrspec_sqri_inflate 11501
Flx_sub 137880384
Flx_subspec 897447
Flx_to_Flv 65628605
Flx_to_FlxX 71408
Flx_to_ZX 37066393
Flx_to_ZX_inplace 36403459
Flx_to_int_halfspec 510002
Flx_to_int_quartspec 204477
Flx_translate1 16107
Flx_translate1_basecase 28201
Flx_triple 1049005
Flx_val 4156906
Flx_valrem 26282859
Flxn_div 55015
Flxn_div_pre 55044
Flxn_exp 0
Flxn_expint 109338
Flxn_inv 1030
Flxn_mul 75303
Flxn_mul_pre 5062667
Flxn_mulhigh 515927
Flxn_recip 216940
Flxn_red 6228800
Flxn_sqr 0
Flxn_sqr_pre 0
FlxqC_Flxq_mul 0
FlxqM_Flxq_mul 0
FlxqM_mul_Kronecker 88394
FlxqV_dotproduct 0
FlxqV_dotproduct_pre 113589
FlxqX_dotproduct 2058
Flxq_autpow 7
Flxq_autpow_msqr 20771
Flxq_autpow_pre 31997
Flxq_autpow_sqr 46405
Flxq_autpowers 1679
Flxq_autsum 0
Flxq_autsum_mul 113376
Flxq_autsum_pre 99233
Flxq_autsum_sqr 105654
Flxq_auttrace 0
Flxq_auttrace_mul 762969
Flxq_auttrace_pre 934770
Flxq_auttrace_sqr 635740
Flxq_charpoly 3632
Flxq_conjvec 20
Flxq_div 237696
Flxq_div_pre 2416226
Flxq_easylog 548223
Flxq_inv 345511
Flxq_inv_pre 4381342
Flxq_invsafe 656134
Flxq_invsafe_pre 5483165
Flxq_is2npower 0
Flxq_issquare 403982
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 170598
Flxq_minpoly 44433
Flxq_minpoly_pre 784145
Flxq_mul 13185380
Flxq_mul_pre 195418076
Flxq_norm 442921
Flxq_order 97239
Flxq_pow 930805
Flxq_pow_Frobenius 26325208
Flxq_pow_init 0
Flxq_pow_init_pre 28
Flxq_pow_pre 27250563
Flxq_pow_table 0
Flxq_pow_table_pre 4393
Flxq_powers 232070
Flxq_powers_pre 22182395
Flxq_powu 486769
Flxq_powu_pre 24103971
Flxq_sqr 2750865
Flxq_sqr_pre 280698002
Flxq_sqrt 225383
Flxq_sqrt_pre 225383
Flxq_sqrtn 20110
Flxq_sumautsum_msqr 40494
Flxq_sumautsum_pre 200606
Flxq_sumautsum_sqr 284170
Flxq_trace 4696
Flxq_transmul 4083978
Flxq_transmul_init 1691762
RgXV_to_FlxV 7
RgX_to_Flx 2355307
Rg_to_F2 1706841
Rg_to_Fl 72639715
Rg_to_Flxq 3564825
ZM_unpack_FlxqM 29494
ZM_unpack_FlxqM_bits 58900
ZXT_to_FlxT 3797955
ZXV_to_FlxV 0
ZX_to_Flx 167367525
Z_mod2BIL_Flx 294934
Z_mod2BIL_Flx_2 297864
Z_mod2BIL_Flx_3 0
Z_to_Flx 2673749
ZpX_invLaplace_init 497
_Fl2_mul 1887266
_Fl2_pow 656658
_Fl2_rand 111122
_Fl2_sqr 4820847
_Flx_add 578752
_Flx_composedsum 3826
_Flx_divrem 0
_Flx_mul 10480797
_Flx_sqr 0
_Flxq_equal0 165726
_Flxq_inv 18980
_Flxq_mul 154587094
_Flxq_neg 553759
_Flxq_one 22182541
_Flxq_pow 26317838
_Flxq_powu 68
_Flxq_powu_i 22872797
_Flxq_rand 40901
_Flxq_red 1773458
_Flxq_rmul 1577339
_Flxq_s 16890
_Flxq_sqr 272748012
bounded_order 422662
gener_Flxq 7187
get_Fl_threshold 2320938107
get_Flx_red 981809150
get_Flxq_field 73605
get_Flxq_star 281811
init_invlaplace 12514
int_to_Flx 12303
int_to_Flx_half 594205
int_to_Flx_quart 107349
kron_pack_Flx_spec 53832
kron_pack_Flx_spec_2 3389
kron_pack_Flx_spec_3 0
kron_pack_Flx_spec_bits 20732989
kron_pack_Flx_spec_half 857537
kron_unpack_Flx 42953
kron_unpack_Flx_2 2930
kron_unpack_Flx_3 0
kron_unpack_Flx_bits_narrow 5651078
kron_unpack_Flx_bits_wide 5538517
matJ2_FlxM 13
matid2_FlxM 895
maxbitcoeffpol 8326179
mkF2 7191382
monomial_Flx 912720
random_Flx 2579503
set_Flxq 73625
set_Flxq_pre 72702398
translate_basecase 41366
zero_FlxC 0
zero_FlxM 0
zl_Xp1_powu 12017
zlx_translate1 25259
zx_to_Flx 6077244

Generated by: LCOV version 1.16