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.18.1 lcov report (development 29950-285c5b69ed) Lines: 1673 1835 91.2 %
Date: 2025-02-05 09:09:51 Functions: 187 200 93.5 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fp2_norm 19390
Fp2_sqrt 19821
FpVV_polint_tree 15
FpV_FpM_polint 0
FpV_inv 34071
FpV_invVandermonde 31629
FpV_polint 22
FpV_producttree 31644
FpV_roots_to_pol 93153
FpXC_FpXQV_eval 1470
FpXC_FpXQ_eval 588
FpXM_FpXQV_eval 315
FpXM_FpX_mul2 33664
FpXM_mul2 16389
FpXQM_autsum 147
FpXQM_autsum_mul 315
FpXQM_autsum_sqr 217
FpXQ_autpow 3873
FpXQ_autpow_msqr 21
FpXQ_autpow_sqr 4167
FpXQ_autpowers 1771
FpXQ_autsum 2718
FpXQ_autsum_mul 2892
FpXQ_autsum_sqr 2739
FpXQ_auttrace 436
FpXQ_auttrace_mul 360
FpXQ_auttrace_sqr 317
FpXQ_charpoly 15
FpXQ_conjvec 8
FpXQ_div 532020
FpXQ_inv 1097400
FpXQ_invsafe 1097399
FpXQ_issquare 401389
FpXQ_log 708206
FpXQ_matrix_pow 66290
FpXQ_minpoly 13372
FpXQ_mul 10697442
FpXQ_norm 363852
FpXQ_order 1816
FpXQ_pow 907012
FpXQ_pow_Frobenius 188200
FpXQ_powers 380215
FpXQ_powu 607818
FpXQ_red 17806367
FpXQ_sqr 5761848
FpXQ_sqrt 80861
FpXQ_sqrtn 725
FpXQ_sumautsum 724
FpXQ_sumautsum_msqr 94
FpXQ_sumautsum_sqr 262
FpXQ_trace 21079
FpXQ_transmul 2638
FpXQ_transmul_init 1020
FpXT_red 1664358
FpXT_sqr 7602
FpXV_FpX_fromdigits 4564
FpXV_chinese 588
FpXV_chinese_tree 588
FpXV_chinesetree 588
FpXV_factorback 22622
FpXV_invdivexact 588
FpXV_prod 309382
FpXV_producttree 588
FpXV_producttree_dbl 32232
FpXV_red 404563
FpXV_sqr 588
FpX_FpV_multieval 0
FpX_FpV_multieval_tree 31642
FpX_FpXM_qmul 16298
FpX_FpXQV_eval 403040
FpX_FpXQ_eval 794396
FpX_FpXV_multirem 0
FpX_FpXV_multirem_dbl_tree 32231
FpX_FpXV_multirem_tree 588
FpX_Fp_add 907469
FpX_Fp_add_shallow 0
FpX_Fp_div 612089
FpX_Fp_mul 5629161
FpX_Fp_mul_to_monic 134094
FpX_Fp_mulspec 5643709
FpX_Fp_sub 588513
FpX_Fp_sub_shallow 11146
FpX_Frobenius 444381
FpX_Laplace 576
FpX_Newton 523340
FpX_add 16029732
FpX_addmulmul 80989
FpX_center 311956
FpX_center_i 1241988
FpX_chinese_coprime 0
FpX_convol 994
FpX_deriv 1632025
FpX_digits 11403
FpX_disc 42
FpX_div_by_X_x 165027
FpX_divrem 14269815
FpX_divrem_Barrett 212934
FpX_divrem_Barrettspec 213680
FpX_divrem_basecase 65355941
FpX_divu 8610
FpX_dotproduct 7996
FpX_eval 964089
FpX_extgcd 1439346
FpX_extgcd_basecase 584625
FpX_extgcd_halfgcd 13387
FpX_extresultant 77
FpX_extresultant_basecase 24
FpX_fromNewton 11334
FpX_gcd 1011075
FpX_gcd_basecase 53013
FpX_gcd_check 799
FpX_get_red 942269
FpX_halfgcd 657
FpX_halfgcd_all 15190
FpX_halfgcd_all_i 15050
FpX_halfres 106
FpX_halfres_basecase 31438
FpX_halfres_i 48820
FpX_halfres_split 17382
FpX_halfres_update 3749
FpX_halve 94912
FpX_integ 0
FpX_integXn 55491
FpX_invBarrett 4895
FpX_invBarrett_Newton 1518
FpX_invBarrett_basecase 3324
FpX_invLaplace 158
FpX_is_squarefree 40966
FpX_matFrobenius 31492
FpX_mul 25928786
FpX_mulhigh_i 114901
FpX_mulspec 7996547
FpX_mulu 1060822
FpX_neg 468006
FpX_normalize 1840016
FpX_powu 317803
FpX_recipspec 431919
FpX_red 92583089
FpX_rem 70220843
FpX_rescale 178672
FpX_resultant 415725
FpX_resultant_basecase 4023
FpX_shift 961881
FpX_sqr 5954441
FpX_sub 14523416
FpX_subspec 14737089
FpX_valrem 254727
FpXn_div 6412
FpXn_exp 0
FpXn_expint 17249
FpXn_inv 6412
FpXn_mul 2559684
FpXn_mulhigh 59410
FpXn_recip 534192
FpXn_red 199478
FpXn_sqr 0
Fp_FpXQ_log 544249
Fp_FpX_sub 25690
Fp_issquare 1336138
Fp_neg_FpX 935
Fp_red_FpX 21506
FqV_inv 0
Fq_ispower 70
Fq_issquare 1630934
Fq_log 2193850
ZX_lgrenormalizespec 458341
Z_to_FpX 1726
_FpXQ_add 2243776
_FpXQ_cmul 2651687
_FpXQ_easylog 380
_FpXQ_mul 1581177
_FpXQ_one 873612
_FpXQ_pow 173206
_FpXQ_rand 525
_FpXQ_red 874669
_FpXQ_sqr 4848452
_FpXQ_sub 52941
_FpXQ_zero 4095
_FpX_add 20062
_FpX_divrem 134778
_FpX_mul 370439
_FpX_one 0
_FpX_pow 34954
_FpX_red 0
_FpX_sqr 86354
_FpX_zero 0
bounded_order 3893
gc_chinese 588
gener_FpXQ 7030
gener_FpXQ_i 83396
gener_FpXQ_local 83362
get_FpXQ_algebra 10199
get_FpXQ_star 2319
get_FpX_algebra 0
get_FpX_red 84502767
matJ2_FpXM 8
matid2_FpXM 24
random_FpX 254402
to_Flx 44504909
to_Flxq 2136082

Generated by: LCOV version 1.16