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.0 lcov report (development 29806-4d001396c7) Lines: 1626 1788 90.9 %
Date: 2024-12-22 09:08:28 Functions: 184 197 93.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fp2_norm 19360
Fp2_sqrt 19791
FpVV_polint_tree 15
FpV_FpM_polint 0
FpV_inv 34038
FpV_invVandermonde 31597
FpV_polint 22
FpV_producttree 31612
FpV_roots_to_pol 93114
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 5020
FpXQ_autpow_msqr 21
FpXQ_autpow_sqr 5733
FpXQ_autpowers 1771
FpXQ_autsum 4383
FpXQ_autsum_mul 6074
FpXQ_autsum_sqr 4453
FpXQ_auttrace 437
FpXQ_auttrace_mul 360
FpXQ_auttrace_sqr 317
FpXQ_charpoly 15
FpXQ_conjvec 8
FpXQ_div 530715
FpXQ_inv 1095725
FpXQ_invsafe 1095725
FpXQ_issquare 400726
FpXQ_log 708172
FpXQ_matrix_pow 66290
FpXQ_minpoly 13341
FpXQ_mul 11594957
FpXQ_norm 363651
FpXQ_order 1813
FpXQ_pow 913552
FpXQ_pow_Frobenius 195298
FpXQ_powers 383516
FpXQ_powu 604366
FpXQ_red 17870190
FpXQ_sqr 6024149
FpXQ_sqrt 80789
FpXQ_sqrtn 1435
FpXQ_trace 21074
FpXQ_transmul 2643
FpXQ_transmul_init 1022
FpXT_red 1663983
FpXT_sqr 7602
FpXV_FpX_fromdigits 4564
FpXV_chinese 588
FpXV_chinese_tree 588
FpXV_chinesetree 588
FpXV_factorback 22216
FpXV_invdivexact 588
FpXV_prod 309051
FpXV_producttree 588
FpXV_producttree_dbl 32199
FpXV_red 404435
FpXV_sqr 588
FpX_FpV_multieval 0
FpX_FpV_multieval_tree 31612
FpX_FpXM_qmul 16298
FpX_FpXQV_eval 408693
FpX_FpXQ_eval 792733
FpX_FpXV_multirem 0
FpX_FpXV_multirem_dbl_tree 32200
FpX_FpXV_multirem_tree 588
FpX_Fp_add 906675
FpX_Fp_add_shallow 0
FpX_Fp_div 612190
FpX_Fp_mul 5672482
FpX_Fp_mul_to_monic 133739
FpX_Fp_mulspec 5687153
FpX_Fp_sub 588313
FpX_Fp_sub_shallow 11146
FpX_Frobenius 444180
FpX_Laplace 576
FpX_Newton 520224
FpX_add 16909166
FpX_addmulmul 81037
FpX_center 311432
FpX_center_i 1235777
FpX_chinese_coprime 0
FpX_convol 994
FpX_deriv 1628398
FpX_digits 11403
FpX_disc 42
FpX_div_by_X_x 164907
FpX_divrem 14366748
FpX_divrem_Barrett 212859
FpX_divrem_Barrettspec 213605
FpX_divrem_basecase 66570287
FpX_divu 8610
FpX_dotproduct 8004
FpX_eval 963725
FpX_extgcd 1437421
FpX_extgcd_basecase 584747
FpX_extgcd_halfgcd 13435
FpX_extresultant 77
FpX_extresultant_basecase 24
FpX_fromNewton 11334
FpX_gcd 1011891
FpX_gcd_basecase 52544
FpX_gcd_check 804
FpX_get_red 958714
FpX_halfgcd 658
FpX_halfgcd_all 15239
FpX_halfgcd_all_i 15099
FpX_halfres 106
FpX_halfres_basecase 31487
FpX_halfres_i 48869
FpX_halfres_split 17382
FpX_halfres_update 3749
FpX_halve 94891
FpX_integ 0
FpX_integXn 55491
FpX_invBarrett 4885
FpX_invBarrett_Newton 1508
FpX_invBarrett_basecase 3324
FpX_invLaplace 158
FpX_is_squarefree 40920
FpX_matFrobenius 31492
FpX_mul 26567674
FpX_mulhigh_i 114901
FpX_mulspec 7997734
FpX_mulu 1057404
FpX_neg 467801
FpX_normalize 1836779
FpX_powu 317243
FpX_recipspec 431766
FpX_red 93728582
FpX_rem 71547312
FpX_rescale 177520
FpX_resultant 416413
FpX_resultant_basecase 3877
FpX_shift 958774
FpX_sqr 6216523
FpX_sub 14305501
FpX_subspec 14519099
FpX_valrem 253228
FpXn_div 6412
FpXn_exp 0
FpXn_expint 17249
FpXn_inv 6412
FpXn_mul 2559688
FpXn_mulhigh 59410
FpXn_recip 531055
FpXn_red 199478
FpXn_sqr 0
Fp_FpXQ_log 544478
Fp_FpX_sub 25690
Fp_issquare 1335928
Fp_neg_FpX 935
Fp_red_FpX 21043
FqV_inv 0
Fq_ispower 70
Fq_issquare 1631123
Fq_log 2193779
ZX_lgrenormalizespec 457974
Z_to_FpX 1726
_FpXQ_add 2263870
_FpXQ_cmul 2678658
_FpXQ_easylog 618
_FpXQ_mul 1609794
_FpXQ_one 887939
_FpXQ_pow 179999
_FpXQ_rand 1968
_FpXQ_red 885621
_FpXQ_sqr 5114812
_FpXQ_sub 52941
_FpXQ_zero 4123
_FpX_add 20062
_FpX_divrem 134778
_FpX_mul 370084
_FpX_one 0
_FpX_pow 34499
_FpX_red 0
_FpX_sqr 86200
_FpX_zero 0
bounded_order 6251
gc_chinese 588
gener_FpXQ 7016
gener_FpXQ_i 83392
gener_FpXQ_local 83355
get_FpXQ_algebra 10199
get_FpXQ_star 3040
get_FpX_algebra 0
get_FpX_red 85925247
matJ2_FpXM 8
matid2_FpXM 24
random_FpX 259703
to_Flx 44540026
to_Flxq 2131782

Generated by: LCOV version 1.16