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 - FF.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30702-bddb8d6928) Lines: 1350 1493 90.4 %
Date: 2026-02-23 02:23:56 Functions: 141 153 92.2 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
F3x_equalm1 0
FFX_add 0
FFX_halfgcd 0
FFX_nbroots 0
FF_to_F2xq_i 0
FF_to_Flxq_i 0
Fp_cmp_1 0
FqV_to_FFV 0
FqX_to_FFX 0
RgC_is_FFC 0
RgM_is_FFM 0
Rg_is_FF 0
FFXQ_sqr 6
FFX_ddf 6
FFX_factor_squarefree 6
FF_issquare 6
FFXQ_inv 10
FFV_roots_to_pol 12
FF_ellcard_SEA 12
FFX_resultant 15
FFX_extgcd 16
gc_gcdext 16
FFM_indexrank 18
FFX_halfgcd_all 18
raw_to_FFXM 18
FF_charpoly 24
FF_conjvec 24
FF_norm 24
FF_trace 24
FFX_disc 28
FFM_suppl 30
FF_Frobenius 36
FF_equalm1 36
FFM_image 42
raw_to_FFXC 42
FFM_FFC_gauss 48
FF_order 48
FFM_FFC_invimage 54
FFM_det 54
FFM_gauss 54
fforder 54
FFM_rank 60
FFM_ker 66
FFXQ_minpoly 66
FFM_deplin 72
FFM_FFC_mul 78
FF_elllog 78
FF_elltatepairing 84
FFXQ_mul 88
FFM_invimage 90
FF_p 96
FF_elldata 102
FFX_degfact 108
FF_pow 109
FF_var 120
FFM_inv 126
FF_minpoly 132
FFX_ispower 144
FFX_preimagerel 144
FF_issquareall 162
FF_log 162
fflog 162
FFM_FFC_wrap 180
FF_ispower 180
FFM_wrap 264
FF_f 318
FF_primroot 348
ffprimroot 348
FFX_factor 378
raw_to_FFX_fact 384
Z_FF_div 390
FqM_to_FpXQM 410
FFX_rem 484
FF_gen 656
FFX_preimage 828
FFX_preimage_i 882
FF_Q_add 1146
FqM_to_FFM 1470
FpXQ_ell_to_a4a6 1479
FF_ellorder 1512
FF_map 1530
FqV_to_FpXQV 1634
FF_sqrtn 1871
FFX_zero 2099
FFX_sqr 2130
FFX_gcd 2208
ffgen 2500
FF_Z_Z_muldiv 2772
FqC_to_FpXQC 2987
FqC_to_FFC 3198
FFM_mul 3852
FFM_FFM_wrap 3996
raw_to_FFM 4152
FF_ellweilpairing 4284
FF_zero 5069
FF_sqrt 6138
Tp_to_FF 7050
p_to_FF 8196
FFM_to_raw 8544
FF_inv 10905
FF_ellgens 15528
to_FFE_vec 15528
FF_to_FpXQ 17732
FF_1 19134
FF_equal1 20152
FF_ellgroup 22386
FF_elltwist 23304
F3xq_ell_to_a4a6 26964
FFC_to_raw 37962
F2xq_ell_to_a4a6 38777
FF_equal 57599
Flxq_ell_to_a4a6 63229
FF_neg 69558
FF_q 70026
FF_neg_i 72492
FF_ellcard 88194
FFX_roots 88860
FFX_mul 89846
FFX_wrap2 92554
raw_to_FFX 94581
FF_ellinit 103383
raw_to_FFC 106626
Fq_to_FF 123204
FF_mod 142998
FF_to_FpXQ_i 147546
ffrandom 158133
FF_mul2n 185943
FF_sub 200266
FF_div 210211
FF_ellrandom 210555
FF_ellmul 213492
FFX_to_raw 278144
Z_to_raw 369244
to_FFE 441693
rawFq_to_FF 568645
FF_to_Flxq 626556
FF_to_F2xq 783517
FF_Z_add 1168347
FF_Z_mul 1843381
Rg_to_raw 1895837
FF_p_i 2258741
FF_sqr 2543251
mkFF_i 2687539
_mkFF_i 2883235
FF_equal0 7748993
FF_add 11254891
FF_mul 11726951
_checkFF 23392481
FF_samechar 26452426
FF_samefield 26452426
_mkFF 29410244
_initFF 29611893
_getFF 30919531

Generated by: LCOV version 1.16