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) Coverage Total Hit
Test: PARI/GP v2.19.0 lcov report (development 31092-e6893b0017) Lines: 83.6 % 1838 1536
Test Date: 2026-12-03 17:02:49 Functions: 89.3 % 214 191
Legend: Lines:     hit not hit

Function Name Sort by function name Hit count Sort by function hit count
F2xC_to_FlxC 0
F2xC_to_ZXC 4116
F2xV_to_F2m 236487
F2xV_to_FlxV_inplace 34238
F2xV_to_ZXV_inplace 1453162
F2xXC_to_ZXXC 1141
F2xXV_to_F2xM 0
F2xX_F2x_add 0
F2xX_F2x_mul 482261
F2xX_add 424054
F2xX_addspec 1186
F2xX_deriv 80589
F2xX_lgrenormalizespec 3337
F2xX_recipspec 2423
F2xX_renormalize 2716269
F2xX_to_F2xC 0
F2xX_to_FlxX 56
F2xX_to_Kronecker 311050
F2xX_to_Kronecker_spec 6038
F2xX_to_ZXX 1470
F2xXn_red 0
F2xY_F2xqV_evalx 136640
F2xY_F2xq_evalx 0
F2xY_degreex 207075
F2x_1_add 190472
F2x_F2xqV_eval 611467
F2x_F2xq_eval 45215
F2x_Frobenius 663313
F2x_add 41485084
F2x_addshift 46908
F2x_addshiftip 143544259
F2x_addshiftipspec 170225368
F2x_addspec 73287
F2x_deflate 0
F2x_degree 88962397
F2x_degree_lg 291778867
F2x_degreespec 264
F2x_deriv 1298240
F2x_divrem 13977419
F2x_eval 14350
F2x_even_odd 62174
F2x_extgcd 2852911
F2x_factorel 15032
F2x_gcd 3927493
F2x_get_red 219049
F2x_halfgcd 960
F2x_halfgcd_i 960
F2x_is_smooth 238017
F2x_is_smooth_squarefree 273711
F2x_is_x 19369
F2x_issquare 35694
F2x_matFrobenius 236487
F2x_mul 34676288
F2x_mul1 24380017
F2x_mulspec 34740470
F2x_mulspec_basecase 3352195
F2x_mulspec_mulii 132
F2x_pow2n 176074
F2x_recip 0
F2x_recip1 35
F2x_recip_raw 0
F2x_rem 53006407
F2x_shift 279628
F2x_shiftip 27764435
F2x_shiftneg 1108
F2x_shiftpos 278520
F2x_slice 1610696
F2x_sqr 7074633
F2x_sqrt 251811
F2x_to_F2v 1565401
F2x_to_F2xX 378
F2x_to_Flx 133602
F2x_to_ZX 1536939
F2x_to_int 264
F2x_valrem 35546
F2xn_div 35
F2xn_div1 21
F2xn_inv 28
F2xn_inv1 35
F2xn_inv_basecase1 35
F2xn_mul 39
F2xn_red 76
F2xqV_roots_to_deg1 7
F2xqV_roots_to_pol 7
F2xqXM_F2xqX_mul2 0
F2xqXM_mul2 0
F2xqXQV_red 63
F2xqXQ_autpow 70558
F2xqXQ_autpow_mul 33416
F2xqXQ_autpow_sqr 88832
F2xqXQ_auttrace 2737
F2xqXQ_auttrace_mul 7196
F2xqXQ_auttrace_sqr 4907
F2xqXQ_inv 7
F2xqXQ_invsafe 7
F2xqXQ_mul 114537
F2xqXQ_pow 7
F2xqXQ_powers 7728
F2xqXQ_sqr 104417
F2xqXV_prod 7
F2xqX_F2xqXM_qmul 0
F2xqX_F2xqXQV_eval 14441
F2xqX_F2xqXQ_eval 122248
F2xqX_F2xq_mul 6993
F2xqX_F2xq_mul_to_monic 206606
F2xqX_addmulmul 0
F2xqX_disc 14
F2xqX_divrem 33243
F2xqX_divrem_Barrett 1186
F2xqX_divrem_Barrettspec 1189
F2xqX_divrem_basecase 545842
F2xqX_extgcd 14
F2xqX_extgcd_basecase 14
F2xqX_extgcd_halfgcd 0
F2xqX_gcd 170012
F2xqX_gcd_basecase 169613
F2xqX_get_red 220365
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 155525
F2xqX_mulspec 3019
F2xqX_normalize 206620
F2xqX_powu 0
F2xqX_red 1006014
F2xqX_rem 750990
F2xqX_resultant 21
F2xqX_resultant_basecase 21
F2xqX_sqr 105488
F2xq_Artin_Schreier 213015
F2xq_autpow 19376
F2xq_autpow_mul 14907
F2xq_autpow_sqr 29580
F2xq_conjvec 7
F2xq_div 1384021
F2xq_easylog 559317
F2xq_inv 2852904
F2xq_invsafe 2852911
F2xq_log 543777
F2xq_log_Coppersmith 14
F2xq_log_Coppersmith_d 95
F2xq_log_Coppersmith_rec 28
F2xq_log_Coppersmith_worker 2052
F2xq_log_find_rel 65
F2xq_log_from_rel 71
F2xq_log_index 14
F2xq_matrix_pow 236487
F2xq_mul 14102626
F2xq_order 415
F2xq_pow 2438222
F2xq_pow_init 14
F2xq_pow_table 5245
F2xq_powers 365931
F2xq_powu 49
F2xq_sqr 6715380
F2xq_sqrt 38853
F2xq_sqrt_fast 62174
F2xq_sqrtn 8324
F2xq_trace 458099
FlxC_to_F2xC 16647
FlxXC_to_F2xXC 413
FlxX_to_F2xX 945
Flx_to_F2x 157966
Kronecker_to_F2xqX 158544
RgX_to_F2x 3087
Rg_to_F2xq 801317
ZXX_to_F2xX 5264
ZX_to_F2x 3168719
Z_to_F2x 213618
_F2xqXQ_add 345579
_F2xqXQ_cmul 482261
_F2xqXQ_mul 114481
_F2xqXQ_one 375504
_F2xqXQ_red 352064
_F2xqXQ_sqr 33264
_F2xqXQ_zero 7
_F2xqX_mul 882
_F2xqX_sqr 0
_F2xq_add 1710330
_F2xq_cmul 2098370
_F2xq_equal0 973
_F2xq_inv 413
_F2xq_mul 2186080
_F2xq_neg 798
_F2xq_one 929313
_F2xq_pow 2394860
_F2xq_rand 9385
_F2xq_red 584122
_F2xq_rmul 15890
_F2xq_s 693
_F2xq_sqr 1211934
_F2xq_zero 259885
check_kernel 14
gener_F2xq 161
get_F2xqX_red 784233
get_F2xq_field 1701
int_to_F2x 132
matJ2_F2xXM 0
matid2_F2xXM 0
mkF2 27138
monomial_F2x 2751
pol1_F2xX 447042
polx_F2xX 441
random_F2xqX 2856
rel_Coppersmith 148556
smallirred_F2x 14

Generated by: LCOV version 2.0-1