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 30587-f85873d515) Lines: 1534 1838 83.5 %
Date: 2025-12-29 09:21:39 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 3843
F2xV_to_F2m 234908
F2xV_to_FlxV_inplace 33636
F2xV_to_ZXV_inplace 1451561
F2xXC_to_ZXXC 1141
F2xXV_to_F2xM 0
F2xX_F2x_add 0
F2xX_F2x_mul 481488
F2xX_add 423367
F2xX_addspec 1186
F2xX_deriv 80465
F2xX_lgrenormalizespec 3337
F2xX_recipspec 2423
F2xX_renormalize 2711198
F2xX_to_F2xC 0
F2xX_to_FlxX 56
F2xX_to_Kronecker 310456
F2xX_to_Kronecker_spec 6038
F2xX_to_ZXX 1470
F2xXn_red 0
F2xY_F2xqV_evalx 136416
F2xY_F2xq_evalx 0
F2xY_degreex 206465
F2x_1_add 189947
F2x_F2xqV_eval 610484
F2x_F2xq_eval 44976
F2x_Frobenius 659933
F2x_add 30965710
F2x_addshift 46908
F2x_addshiftip 133453724
F2x_addshiftipspec 161211216
F2x_addspec 73287
F2x_deflate 0
F2x_degree 80282600
F2x_degree_lg 264801372
F2x_degreespec 264
F2x_deriv 1281267
F2x_divrem 11694027
F2x_eval 13370
F2x_even_odd 62556
F2x_extgcd 2042542
F2x_factorel 14974
F2x_gcd 3807881
F2x_get_red 218673
F2x_halfgcd 824
F2x_halfgcd_i 824
F2x_is_smooth 231693
F2x_is_smooth_squarefree 266995
F2x_is_x 19266
F2x_issquare 35581
F2x_matFrobenius 234909
F2x_mul 28351504
F2x_mul1 20086240
F2x_mulspec 28415662
F2x_mulspec_basecase 3824159
F2x_mulspec_mulii 132
F2x_pow2n 165163
F2x_recip 0
F2x_recip1 42
F2x_recip_raw 0
F2x_rem 48220361
F2x_shift 265517
F2x_shiftip 23942842
F2x_shiftneg 929
F2x_shiftpos 264592
F2x_slice 1609211
F2x_sqr 9025754
F2x_sqrt 248546
F2x_to_F2v 1554355
F2x_to_F2xX 378
F2x_to_Flx 133149
F2x_to_ZX 1350504
F2x_to_int 264
F2x_valrem 35360
F2xn_div 42
F2xn_div1 28
F2xn_inv 28
F2xn_inv1 42
F2xn_inv_basecase1 42
F2xn_mul 46
F2xn_red 83
F2xqV_roots_to_deg1 7
F2xqV_roots_to_pol 7
F2xqXM_F2xqX_mul2 0
F2xqXM_mul2 0
F2xqXQV_red 63
F2xqXQ_autpow 70434
F2xqXQ_autpow_mul 33243
F2xqXQ_autpow_sqr 88809
F2xqXQ_auttrace 2723
F2xqXQ_auttrace_mul 7182
F2xqXQ_auttrace_sqr 4893
F2xqXQ_inv 7
F2xqXQ_invsafe 7
F2xqXQ_mul 114240
F2xqXQ_pow 7
F2xqXQ_powers 7714
F2xqXQ_sqr 104279
F2xqXV_prod 7
F2xqX_F2xqXM_qmul 0
F2xqX_F2xqXQV_eval 14413
F2xqX_F2xqXQ_eval 122052
F2xqX_F2xq_mul 6993
F2xqX_F2xq_mul_to_monic 206010
F2xqX_addmulmul 0
F2xqX_disc 14
F2xqX_divrem 33229
F2xqX_divrem_Barrett 1186
F2xqX_divrem_Barrettspec 1189
F2xqX_divrem_basecase 545227
F2xqX_extgcd 14
F2xqX_extgcd_basecase 14
F2xqX_extgcd_halfgcd 0
F2xqX_gcd 169750
F2xqX_gcd_basecase 169365
F2xqX_get_red 219975
F2xqX_halfgcd 0
F2xqX_halfgcd_all 7
F2xqX_halfgcd_all_i 7
F2xqX_halfres 0
F2xqX_halfres_basecase 7
F2xqX_halfres_i 7
F2xqX_halfres_split 0
F2xqX_halfres_update 0
F2xqX_invBarrett 45
F2xqX_invBarrett_Newton 45
F2xqX_invBarrett_basecase 0
F2xqX_mul 155228
F2xqX_mulspec 3019
F2xqX_normalize 206024
F2xqX_powu 0
F2xqX_red 1004041
F2xqX_rem 750127
F2xqX_resultant 21
F2xqX_resultant_basecase 21
F2xqX_sqr 105350
F2xq_Artin_Schreier 211610
F2xq_autpow 19273
F2xq_autpow_mul 14810
F2xq_autpow_sqr 29439
F2xq_conjvec 7
F2xq_div 558175
F2xq_easylog 559738
F2xq_inv 2042535
F2xq_invsafe 2042542
F2xq_log 543779
F2xq_log_Coppersmith 14
F2xq_log_Coppersmith_d 80
F2xq_log_Coppersmith_rec 28
F2xq_log_Coppersmith_worker 2048
F2xq_log_find_rel 57
F2xq_log_from_rel 58
F2xq_log_index 14
F2xq_matrix_pow 234909
F2xq_mul 10051564
F2xq_order 399
F2xq_pow 2442013
F2xq_pow_init 14
F2xq_pow_table 5244
F2xq_powers 364143
F2xq_powu 49
F2xq_sqr 8699642
F2xq_sqrt 38726
F2xq_sqrt_fast 62556
F2xq_sqrtn 8348
F2xq_trace 456829
FlxC_to_F2xC 16520
FlxXC_to_F2xXC 413
FlxX_to_F2xX 945
Flx_to_F2x 157590
Kronecker_to_F2xqX 158247
RgX_to_F2x 1400
Rg_to_F2xq 1164568
ZXX_to_F2xX 4991
ZX_to_F2x 3164320
Z_to_F2x 213079
_F2xqXQ_add 345030
_F2xqXQ_cmul 481488
_F2xqXQ_mul 114184
_F2xqXQ_one 374773
_F2xqXQ_red 351246
_F2xqXQ_sqr 33250
_F2xqXQ_zero 7
_F2xqX_mul 882
_F2xqX_sqr 0
_F2xq_add 1714570
_F2xq_cmul 2102391
_F2xq_equal0 861
_F2xq_inv 364
_F2xq_mul 2185874
_F2xq_neg 756
_F2xq_one 927542
_F2xq_pow 2398757
_F2xq_rand 9639
_F2xq_red 584497
_F2xq_rmul 15799
_F2xq_s 623
_F2xq_sqr 1211745
_F2xq_zero 259292
check_kernel 14
gener_F2xq 161
get_F2xqX_red 783356
get_F2xq_field 1666
int_to_F2x 132
matJ2_F2xXM 0
matid2_F2xXM 0
mkF2 26987
monomial_F2x 70
pol1_F2xX 446187
polx_F2xX 441
random_F2xqX 2842
rel_Coppersmith 147923
smallirred_F2x 14

Generated by: LCOV version 1.16