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 - FpX.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.16.1 lcov report (development 28676-df828f1c94) Lines: 1631 1791 91.1 %
Date: 2023-08-26 07:54:43 Functions: 184 197 93.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fp2_norm 19500
Fp2_sqrt 19931
FpVV_polint_tree 15
FpV_FpM_polint 0
FpV_inv 34298
FpV_invVandermonde 31856
FpV_polint 22
FpV_producttree 31872
FpV_roots_to_pol 93067
FpXC_FpXQV_eval 1470
FpXC_FpXQ_eval 588
FpXM_FpXQV_eval 315
FpXM_FpX_mul2 33750
FpXM_mul2 16432
FpXQM_autsum 147
FpXQM_autsum_mul 315
FpXQM_autsum_sqr 217
FpXQ_autpow 5110
FpXQ_autpow_msqr 21
FpXQ_autpow_sqr 5823
FpXQ_autpowers 1757
FpXQ_autsum 4356
FpXQ_autsum_mul 6050
FpXQ_autsum_sqr 4426
FpXQ_auttrace 382
FpXQ_auttrace_mul 358
FpXQ_auttrace_sqr 302
FpXQ_charpoly 15
FpXQ_conjvec 8
FpXQ_div 621539
FpXQ_inv 1182740
FpXQ_invsafe 1182741
FpXQ_issquare 389792
FpXQ_log 702030
FpXQ_matrix_pow 66262
FpXQ_minpoly 13346
FpXQ_mul 11900301
FpXQ_norm 360669
FpXQ_order 1883
FpXQ_pow 891048
FpXQ_pow_Frobenius 237960
FpXQ_powers 383177
FpXQ_powu 604872
FpXQ_red 17763861
FpXQ_sqr 6233425
FpXQ_sqrt 80971
FpXQ_sqrtn 1420
FpXQ_trace 21100
FpXQ_transmul 2351
FpXQ_transmul_init 912
FpXT_red 1666108
FpXT_sqr 7602
FpXV_FpX_fromdigits 4564
FpXV_chinese 588
FpXV_chinese_tree 588
FpXV_chinesetree 588
FpXV_factorback 16457
FpXV_invdivexact 588
FpXV_prod 307357
FpXV_producttree 588
FpXV_producttree_dbl 32461
FpXV_red 404220
FpXV_sqr 588
FpX_FpV_multieval 0
FpX_FpV_multieval_tree 31872
FpX_FpXM_qmul 16341
FpX_FpXQV_eval 408132
FpX_FpXQ_eval 794051
FpX_FpXV_multirem 0
FpX_FpXV_multirem_dbl_tree 32460
FpX_FpXV_multirem_tree 588
FpX_Fp_add 906640
FpX_Fp_add_shallow 0
FpX_Fp_div 703086
FpX_Fp_mul 5837085
FpX_Fp_mul_to_monic 122576
FpX_Fp_mulspec 5851978
FpX_Fp_sub 588636
FpX_Fp_sub_shallow 11146
FpX_Frobenius 400072
FpX_Laplace 576
FpX_Newton 524095
FpX_add 16993424
FpX_addmulmul 81209
FpX_center 201903
FpX_center_i 1242186
FpX_chinese_coprime 0
FpX_convol 994
FpX_deriv 1200260
FpX_digits 11403
FpX_disc 42
FpX_div_by_X_x 165297
FpX_divrem 14209209
FpX_divrem_Barrett 213385
FpX_divrem_Barrettspec 214132
FpX_divrem_basecase 66839223
FpX_divu 8610
FpX_dotproduct 7542
FpX_eval 962404
FpX_extgcd 1517286
FpX_extgcd_basecase 675582
FpX_extgcd_halfgcd 13435
FpX_extresultant 77
FpX_extresultant_basecase 24
FpX_fromNewton 11334
FpX_gcd 536821
FpX_gcd_basecase 51746
FpX_gcd_check 782
FpX_get_red 1000508
FpX_halfgcd 575
FpX_halfgcd_all 15156
FpX_halfgcd_all_i 15044
FpX_halfres 106
FpX_halfres_basecase 31475
FpX_halfres_i 48900
FpX_halfres_split 17425
FpX_halfres_update 3749
FpX_halve 94891
FpX_integ 0
FpX_integXn 55491
FpX_invBarrett 4877
FpX_invBarrett_Newton 1560
FpX_invBarrett_basecase 3264
FpX_invLaplace 158
FpX_is_squarefree 40985
FpX_matFrobenius 31465
FpX_mul 26919085
FpX_mulhigh_i 114901
FpX_mulspec 7999327
FpX_mulu 1279595
FpX_neg 459405
FpX_normalize 1775275
FpX_powu 306959
FpX_recipspec 432543
FpX_red 92826846
FpX_rem 71728463
FpX_rescale 176578
FpX_resultant 412819
FpX_resultant_basecase 4294
FpX_shift 962110
FpX_sqr 6425804
FpX_sub 14704475
FpX_subspec 14918618
FpX_valrem 253112
FpXn_div 6412
FpXn_exp 0
FpXn_expint 17249
FpXn_inv 6412
FpXn_mul 2559444
FpXn_mulhigh 59410
FpXn_recip 534928
FpXn_red 199650
FpXn_sqr 0
Fp_FpXQ_log 544755
Fp_FpX_sub 25676
Fp_issquare 1289567
Fp_neg_FpX 935
Fp_red_FpX 21001
FqV_inv 0
Fq_ispower 70
Fq_issquare 1561907
Fq_log 2187201
ZX_lgrenormalizespec 460130
Z_to_FpX 1726
_FpXQ_add 2258177
_FpXQ_cmul 2672401
_FpXQ_easylog 617
_FpXQ_mul 1693232
_FpXQ_one 886826
_FpXQ_pow 222972
_FpXQ_rand 1970
_FpXQ_red 884156
_FpXQ_sqr 5140749
_FpXQ_sub 52941
_FpXQ_zero 4123
_FpX_add 20062
_FpX_divrem 134778
_FpX_mul 368639
_FpX_one 0
_FpX_pow 26224
_FpX_red 0
_FpX_sqr 85887
_FpX_zero 0
bounded_order 6437
gc_chinese 588
gener_FpXQ 7002
gener_FpXQ_i 83253
gener_FpXQ_local 83216
get_FpXQ_algebra 10199
get_FpXQ_star 3116
get_FpX_algebra 0
get_FpX_red 85935598
matJ2_FpXM 8
matid2_FpXM 24
random_FpX 258682
to_Flx 43651924
to_Flxq 2062643

Generated by: LCOV version 1.14