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.1 lcov report (development 30565-738e569de9) Lines: 2553 2925 87.3 %
Date: 2025-11-30 09:23:42 Functions: 304 363 83.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl2_equal1 463233
Fl2_inv_pre 202336
Fl2_mul_pre 2015587
Fl2_norm_pre 128224
Fl2_pow_pre 691040
Fl2_sqr_pre 5076114
Fl2_sqrt_pre 65765
Fl2_sqrtn_pre 78462
Fl_Flxq_log 35534
Fl_Xp1_powu 0
Fl_to_Flx 21214999
Flm_to_FlxV 2772
FlvV_polint_tree 2540854
Flv_Flm_polint 103494
Flv_inv 1744838
Flv_invVandermonde 153445
Flv_inv_i 1756850
Flv_inv_indir 51280
Flv_inv_inplace 12017
Flv_inv_pre 10049
Flv_inv_pre_indir 21289808
Flv_inv_pre_inplace 19569920
Flv_polint 1486609
Flv_prod 0
Flv_prod_pre 3304
Flv_producttree 1746039
Flv_roots_to_pol 795626
Flv_to_Flx 25514347
FlxC_Fl_translate 0
FlxC_FlxqV_eval 0
FlxC_FlxqV_eval_pre 0
FlxC_Flxq_eval 0
FlxC_Flxq_eval_pre 0
FlxC_eval_powers_pre 325159
FlxC_neg 0
FlxC_sub 0
FlxC_to_ZXC 104060
FlxM_Fl_translate 0
FlxM_Flx_add_shallow 0
FlxM_Flx_mul2 26000
FlxM_eval_powers_pre 22302
FlxM_max_degree 0
FlxM_max_degree_i 0
FlxM_mul 0
FlxM_mul2 7099
FlxM_mul_Kronecker_i 81581
FlxM_neg 0
FlxM_pack_ZM 46835
FlxM_pack_ZM_bits 116239
FlxM_sub 0
FlxM_to_FlxXV 0
FlxM_to_ZXM 2485
FlxT_red 293594
FlxV_Flc_mul 34482
FlxV_Flv_multieval 2471
FlxV_Flv_multieval_tree 2471
FlxV_Flx_fromdigits 0
FlxV_composedsum 28960
FlxV_factorback 0
FlxV_max_degree_i 0
FlxV_prod 0
FlxV_red 0
FlxV_to_Flm 171878
FlxV_to_Flm_lg 12984206
FlxV_to_FlxX 397977
FlxV_to_ZXV 606919
FlxV_to_ZXV_inplace 3031453
Flx_Fl2_eval_pre 10773
Flx_Fl_add 10028615
Flx_Fl_mul 7327566
Flx_Fl_mul_pre 18298239
Flx_Fl_mul_to_monic 12028386
Flx_Fl_sub 151840
Flx_Fl_translate 0
Flx_Flv_multieval 0
Flx_Flv_multieval_tree 1786338
Flx_FlxM_qmul 6927
Flx_FlxqV_eval 5082
Flx_FlxqV_eval_pre 13182801
Flx_Flxq_eval 791737
Flx_Flxq_eval_pre 2448977
Flx_Frobenius 86485
Flx_Frobenius_pre 13816112
Flx_Laplace 27348
Flx_Newton 54101
Flx_add 64919677
Flx_addmulmul 416805
Flx_addshift 3728641
Flx_addspec 7257702
Flx_blocks 517136
Flx_blocks_Flm 12983354
Flx_composedprod 0
Flx_composedsum 27553
Flx_convol 0
Flx_deflate 421045
Flx_deriv 22987650
Flx_diff1 14448
Flx_digits 0
Flx_div_by_X_x 34732940
Flx_divrem 30452176
Flx_divrem_Barrett 604484
Flx_divrem_Barrettspec 905611
Flx_divrem_basecase 62321442
Flx_divrem_pre 79761025
Flx_double 2445177
Flx_equal 28428767
Flx_eval 20411979
Flx_eval2BILspec 579089
Flx_eval_powers_pre 48542456
Flx_eval_pre 136376177
Flx_extgcd 857250
Flx_extgcd_basecase 6289676
Flx_extgcd_halfgcd 146655
Flx_extgcd_pre 6289659
Flx_extresultant 53
Flx_extresultant_basecase 53
Flx_extresultant_pre 53
Flx_fromNewton 109399
Flx_gcd 34263134
Flx_gcd_basecase 85198266
Flx_gcd_pre 86860751
Flx_get_red 14506959
Flx_get_red_pre 98830370
Flx_halfgcd 0
Flx_halfgcd_all 154
Flx_halfgcd_all_i 1129685
Flx_halfgcd_all_pre 1129685
Flx_halfgcd_pre 875663
Flx_halfres_basecase 1136764
Flx_halfres_i 1156728
Flx_halfres_pre 1044
Flx_halfres_split 19964
Flx_halfres_update_pre 9405
Flx_halve 14047
Flx_inflate 160328
Flx_integ 0
Flx_integXn 422811
Flx_invBarrett 0
Flx_invBarrett_Newton 23159
Flx_invBarrett_basecase 134339
Flx_invBarrett_pre 158798
Flx_invLaplace 54389
Flx_is_l_pow 8211
Flx_is_smooth 74256
Flx_is_smooth_pre 118851
Flx_is_smooth_squarefree 127011
Flx_is_squarefree 9184118
Flx_lgrenormalizespec 2133507
Flx_matFrobenius 0
Flx_matFrobenius_pre 86569
Flx_mod_Xn1 31764
Flx_mod_Xnm1 5057169
Flx_mul 27831448
Flx_mul_pre 380111907
Flx_mulhigh_i 939078
Flx_mullimb 1188961672
Flx_mullimb_ok 3427659337
Flx_mulspec 385695756
Flx_mulspec_Kronecker 7294337
Flx_mulspec_basecase 348272728
Flx_mulspec_halfmulii 5484
Flx_mulspec_mulii 10139
Flx_mulspec_mulii_inflate 282089
Flx_mulspec_quartmulii 97174
Flx_neg 3264372
Flx_neg_inplace 1778757
Flx_negspec 3264370
Flx_normalize 63977002
Flx_powu 0
Flx_powu_pre 3908
Flx_recip 0
Flx_recipspec 7302148
Flx_red 1880253
Flx_rem 42229003
Flx_rem_basecase 805820170
Flx_rem_pre 930257529
Flx_renormalize 2162096392
Flx_rescale 1117
Flx_resultant 4735296
Flx_resultant_basecase_pre 14621334
Flx_resultant_pre 14623415
Flx_shift 27414663
Flx_shiftip 637282771
Flx_splitting 147266
Flx_sqr 354612
Flx_sqr_pre 280021835
Flx_sqrspec 280297639
Flx_sqrspec_Kronecker 691116
Flx_sqrspec_basecase 280478162
Flx_sqrspec_halfsqri 324
Flx_sqrspec_quartsqri 10218
Flx_sqrspec_sqri 2067
Flx_sqrspec_sqri_inflate 11522
Flx_sub 138708772
Flx_subspec 898005
Flx_to_Flv 66698344
Flx_to_FlxX 71629
Flx_to_ZX 38307048
Flx_to_ZX_inplace 36575023
Flx_to_int_halfspec 468820
Flx_to_int_quartspec 204566
Flx_translate1 17108
Flx_translate1_basecase 29202
Flx_triple 1049887
Flx_unscale 0
Flx_val 4488649
Flx_valrem 27430247
Flxn_div 55178
Flxn_div_pre 55196
Flxn_exp 0
Flxn_expint 109399
Flxn_inv 1037
Flxn_mul 75846
Flxn_mul_pre 5168438
Flxn_mulhigh 517056
Flxn_recip 217406
Flxn_red 6340732
Flxn_sqr 0
Flxn_sqr_pre 0
FlxqC_Flxq_mul 0
FlxqC_red_pre 234845
FlxqM_Flxq_mul 0
FlxqM_mul_Kronecker 81581
FlxqM_red_pre 81581
FlxqV_dotproduct 0
FlxqV_dotproduct_pre 113589
FlxqX_dotproduct 1918
Flxq_autpow 7
Flxq_autpow_msqr 20696
Flxq_autpow_pre 69450
Flxq_autpow_sqr 47313
Flxq_autpowers 1667
Flxq_autsum 0
Flxq_autsum_mul 112472
Flxq_autsum_pre 98768
Flxq_autsum_sqr 105110
Flxq_auttrace 0
Flxq_auttrace_mul 782861
Flxq_auttrace_pre 962553
Flxq_auttrace_sqr 655326
Flxq_charpoly 3624
Flxq_conjvec 20
Flxq_div 237864
Flxq_div_pre 2417764
Flxq_easylog 519374
Flxq_inv 335767
Flxq_inv_pre 4287579
Flxq_invsafe 670687
Flxq_invsafe_pre 5432445
Flxq_is2npower 0
Flxq_issquare 404492
Flxq_log 164217
Flxq_lroot 0
Flxq_lroot_fast 0
Flxq_lroot_fast_pre 113589
Flxq_lroot_pre 25053
Flxq_matrix_pow 399
Flxq_matrix_pow_pre 170665
Flxq_minpoly 45979
Flxq_minpoly_pre 812019
Flxq_mul 13192541
Flxq_mul_pre 192027046
Flxq_norm 443328
Flxq_order 97328
Flxq_pow 948328
Flxq_pow_Frobenius 23878441
Flxq_pow_init 0
Flxq_pow_init_pre 28
Flxq_pow_pre 24941979
Flxq_pow_table 0
Flxq_pow_table_pre 4393
Flxq_powers 232078
Flxq_powers_pre 22448836
Flxq_powu 488426
Flxq_powu_pre 24363749
Flxq_sqr 2763146
Flxq_sqr_pre 279073446
Flxq_sqrt 230484
Flxq_sqrt_pre 230484
Flxq_sqrtl_spec_pre 37667
Flxq_sqrtn 23094
Flxq_sqrtn_spec_pre 21901
Flxq_sumautsum_msqr 40915
Flxq_sumautsum_pre 210713
Flxq_sumautsum_sqr 295314
Flxq_trace 4696
Flxq_transmul 4224843
Flxq_transmul_init 1751310
RgXV_to_FlxV 7
RgX_to_Flx 2250313
Rg_to_F2 1710332
Rg_to_Fl 73224201
Rg_to_Flxq 3598652
ZM_unpack_FlxM 23421
ZM_unpack_FlxM_bits 58160
ZXT_to_FlxT 3813451
ZXV_to_FlxV 0
ZX_to_Flx 171033496
Z_mod2BIL_Flx 293611
Z_mod2BIL_Flx_2 296541
Z_mod2BIL_Flx_3 0
Z_to_Flx 7561760
ZpX_invLaplace_init 497
_Fl2_mul 1986556
_Fl2_pow 691030
_Fl2_rand 118368
_Fl2_sqr 5076125
_Flx_add 0
_Flx_composedsum 3882
_Flx_divrem 0
_Flx_mul 11012288
_Flx_one 0
_Flx_pow 0
_Flx_sqr 0
_Flxq_add 389834
_Flxq_equal0 69139
_Flxq_inv 9460
_Flxq_mul 150815368
_Flxq_neg 366572
_Flxq_one 22448814
_Flxq_pow 23871035
_Flxq_powu 68
_Flxq_powu_i 23107894
_Flxq_rand 6551
_Flxq_red 1550928
_Flxq_rmul 1461838
_Flxq_s 6567
_Flxq_sqr 271186736
bounded_order 395372
gener_Flxq 7201
get_Fl_threshold 2341950191
get_Flx_red 994279473
get_Flxq_field 68902
get_Flxq_star 283445
init_invlaplace 12514
int_to_Flx 12215
int_to_Flx_half 507268
int_to_Flx_quart 107397
kron_pack_Flx_spec 53168
kron_pack_Flx_spec_2 3389
kron_pack_Flx_spec_3 0
kron_pack_Flx_spec_bits 20873488
kron_pack_Flx_spec_half 688104
kron_unpack_Flx 42785
kron_unpack_Flx_2 2930
kron_unpack_Flx_3 0
kron_unpack_Flx_bits_narrow 5656843
kron_unpack_Flx_bits_wide 5610300
matJ2_FlxM 13
matid2_FlxM 911
maxbitcoeffpol 8407854
mkF2 7562041
monomial_Flx 944007
random_Flx 2651293
set_Flxq 68922
set_Flxq_pre 71053570
translate_basecase 42367
zero_FlxC 0
zero_FlxM 0
zero_FlxM_copy 0
zl_Xp1_powu 12017
zlx_translate1 25259
zx_to_Flx 6522452

Generated by: LCOV version 1.16