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 - F2x.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30702-bddb8d6928) Lines: 1534 1838 83.5 %
Date: 2026-02-23 02:23:56 Functions: 191 214 89.3 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
F2xC_to_FlxC 0
F2xC_to_ZXC 3294
F2xV_to_F2m 201104
F2xV_to_FlxV_inplace 28639
F2xV_to_ZXV_inplace 1237307
F2xXC_to_ZXXC 970
F2xXV_to_F2xM 0
F2xX_F2x_add 0
F2xX_F2x_mul 412687
F2xX_add 362857
F2xX_addspec 1016
F2xX_deriv 68962
F2xX_lgrenormalizespec 2846
F2xX_recipspec 2074
F2xX_renormalize 2323186
F2xX_to_F2xC 0
F2xX_to_FlxX 48
F2xX_to_Kronecker 265788
F2xX_to_Kronecker_spec 5156
F2xX_to_ZXX 1250
F2xXn_red 0
F2xY_F2xqV_evalx 116924
F2xY_F2xq_evalx 0
F2xY_degreex 176966
F2x_1_add 162360
F2x_F2xqV_eval 523259
F2x_F2xq_eval 33411
F2x_Frobenius 561195
F2x_add 25283914
F2x_addshift 42314
F2x_addshiftip 112122308
F2x_addshiftipspec 131773113
F2x_addspec 66424
F2x_deflate 0
F2x_degree 68942291
F2x_degree_lg 226674323
F2x_degreespec 176
F2x_deriv 1081037
F2x_divrem 9319836
F2x_eval 11460
F2x_even_odd 26673
F2x_extgcd 1739877
F2x_factorel 12648
F2x_gcd 3201822
F2x_get_red 187406
F2x_halfgcd 720
F2x_halfgcd_i 720
F2x_is_smooth 191856
F2x_is_smooth_squarefree 221310
F2x_is_x 16083
F2x_issquare 29454
F2x_matFrobenius 201104
F2x_mul 23498444
F2x_mul1 16922586
F2x_mulspec 23556018
F2x_mulspec_basecase 2778421
F2x_mulspec_mulii 88
F2x_pow2n 137112
F2x_recip 0
F2x_recip1 26
F2x_recip_raw 0
F2x_rem 42060049
F2x_shift 220002
F2x_shiftip 19729882
F2x_shiftneg 768
F2x_shiftpos 219234
F2x_slice 1376428
F2x_sqr 7660099
F2x_sqrt 207381
F2x_to_F2v 1327458
F2x_to_F2xX 324
F2x_to_Flx 86841
F2x_to_ZX 1150286
F2x_to_int 176
F2x_valrem 29851
F2xn_div 26
F2xn_div1 16
F2xn_inv 21
F2xn_inv1 26
F2xn_inv_basecase1 26
F2xn_mul 29
F2xn_red 56
F2xqV_roots_to_deg1 6
F2xqV_roots_to_pol 6
F2xqXM_F2xqX_mul2 0
F2xqXM_mul2 0
F2xqXQV_red 53
F2xqXQ_autpow 60368
F2xqXQ_autpow_mul 28494
F2xqXQ_autpow_sqr 76118
F2xqXQ_auttrace 2334
F2xqXQ_auttrace_mul 6156
F2xqXQ_auttrace_sqr 4194
F2xqXQ_inv 5
F2xqXQ_invsafe 5
F2xqXQ_mul 97915
F2xqXQ_pow 6
F2xqXQ_powers 6602
F2xqXQ_sqr 89374
F2xqXV_prod 6
F2xqX_F2xqXM_qmul 0
F2xqX_F2xqXQV_eval 12352
F2xqX_F2xqXQ_eval 104612
F2xqX_F2xq_mul 5991
F2xqX_F2xq_mul_to_monic 176561
F2xqX_addmulmul 0
F2xqX_disc 11
F2xqX_divrem 28466
F2xqX_divrem_Barrett 1016
F2xqX_divrem_Barrettspec 1018
F2xqX_divrem_basecase 467271
F2xqX_extgcd 10
F2xqX_extgcd_basecase 10
F2xqX_extgcd_halfgcd 0
F2xqX_gcd 145472
F2xqX_gcd_basecase 145142
F2xqX_get_red 188522
F2xqX_halfgcd 0
F2xqX_halfgcd_all 6
F2xqX_halfgcd_all_i 6
F2xqX_halfres 0
F2xqX_halfres_basecase 6
F2xqX_halfres_i 6
F2xqX_halfres_split 0
F2xqX_halfres_update 0
F2xqX_invBarrett 38
F2xqX_invBarrett_Newton 38
F2xqX_invBarrett_basecase 0
F2xqX_mul 132894
F2xqX_mulspec 2578
F2xqX_normalize 176573
F2xqX_powu 0
F2xqX_red 860512
F2xqX_rem 642893
F2xqX_resultant 16
F2xqX_resultant_basecase 16
F2xqX_sqr 90285
F2xq_Artin_Schreier 181379
F2xq_autpow 16089
F2xq_autpow_mul 10126
F2xq_autpow_sqr 22661
F2xq_conjvec 6
F2xq_div 469443
F2xq_easylog 479111
F2xq_inv 1739872
F2xq_invsafe 1739877
F2xq_log 465752
F2xq_log_Coppersmith 12
F2xq_log_Coppersmith_d 66
F2xq_log_Coppersmith_rec 24
F2xq_log_Coppersmith_worker 1698
F2xq_log_find_rel 48
F2xq_log_from_rel 48
F2xq_log_index 12
F2xq_matrix_pow 201104
F2xq_mul 8483811
F2xq_order 342
F2xq_pow 2090457
F2xq_pow_init 12
F2xq_pow_table 4494
F2xq_powers 311872
F2xq_powu 36
F2xq_sqr 7385575
F2xq_sqrt 32750
F2xq_sqrt_fast 26673
F2xq_sqrtn 7055
F2xq_trace 391139
FlxC_to_F2xC 14160
FlxXC_to_F2xXC 353
FlxX_to_F2xX 809
Flx_to_F2x 107591
Kronecker_to_F2xqX 135472
RgX_to_F2x 1183
Rg_to_F2xq 991117
ZXX_to_F2xX 4270
ZX_to_F2x 2704039
Z_to_F2x 182526
_F2xqXQ_add 295729
_F2xqXQ_cmul 412687
_F2xqXQ_mul 97868
_F2xqXQ_one 321211
_F2xqXQ_red 301056
_F2xqXQ_sqr 28497
_F2xqXQ_zero 6
_F2xqX_mul 756
_F2xqX_sqr 0
_F2xq_add 1015473
_F2xq_cmul 1342391
_F2xq_equal0 834
_F2xq_inv 354
_F2xq_mul 1800130
_F2xq_neg 684
_F2xq_one 741778
_F2xq_pow 2053380
_F2xq_rand 8249
_F2xq_red 448170
_F2xq_rmul 13620
_F2xq_s 594
_F2xq_sqr 1025731
_F2xq_zero 222246
check_kernel 12
gener_F2xq 138
get_F2xqX_red 671359
get_F2xq_field 1458
int_to_F2x 88
matJ2_F2xXM 0
matid2_F2xXM 0
mkF2 22641
monomial_F2x 60
pol1_F2xX 382415
polx_F2xX 371
random_F2xqX 2435
rel_Coppersmith 122220
smallirred_F2x 12

Generated by: LCOV version 1.16