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 - polarit3.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30702-bddb8d6928) Lines: 1906 2201 86.6 %
Date: 2026-02-23 02:23:56 Functions: 205 228 89.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FlxX_resultant 0
FlxX_resultant_pre 0
FpXQX_XpN_powu 0
FpX_composedprod 0
FqC_Fq_mul 0
FqC_add 0
FqC_sub 0
FqM_add 0
FqM_sub 0
FqXQ_matrix_pow 0
FqXQ_powers 0
Fq_invsafe 0
Fq_neg_inv 0
QXQ_intnorm 0
RgM_is_FpM 0
RgV_is_FpV 0
ZXQXQ_minpoly 0
ZXQXQ_minpoly_slice 0
ZXQXQ_minpoly_worker 0
ZX_incremental_CRT 0
ffinit_rand 0
init_Flxq 0
vecbinomial_Fp 0
QX_disc 6
FpX_FpXY_resultant 13
fffrobenius 36
QX_resultant 40
_ZXQ_powu 40
Flx_Lazard 42
err_compo 72
ffextend 78
FpX_composedsum 80
_FpX_composedsum 80
nfX_resultant 86
FqC_FqV_mul 87
FlxX_resultant_subres 90
ffinit_Artin_Schreier_2 102
ffinvmap 114
RgV_to_FpV 120
ffnbirred0 120
ffembed 162
to_ZX 205
ffeltmaprel_i 216
ffmaprel 216
ffmaprel_i 216
FpX_FpXY_eval_resultant 244
FlxX_pseudorem 246
ZXQX_composedsum 270
ZXQX_composedsum_bound 270
nf_direct_compositum 270
Z_init_CRT 272
ZX_composedsum 275
residual_characteristic 288
ZXQX_composedsum_slice 310
ZXQX_composedsum_worker 310
ffcompomap 360
Fp_XpN_powu 372
ffinit_Artin_Schreier 402
ffinit 483
ffsumnbirred 517
ZXM_incremental_CRT 575
ZXM_init_CRT 582
FpX_Fp_translate_basecase 600
RgX_RgXY_ResBound_1 732
ffmap 888
FqX_Fq_sub 911
FpX_Fp_translate 972
char_update_prime 1050
ffpartmapimage 1080
ZXQ_minpoly 1220
FpXV_composedsum 1377
ffinit_fact 1377
fpinit 1457
FqM_red 1458
FpXM_center 1540
FpXY_FpXQ_evaly 1776
checkmap 1938
ffeltmap_i 2322
ZXQ_minpoly_slice 2572
ZXQ_minpoly_worker 2572
FlxY_to_FlyX 2700
Flx_FlxY_resultant 2700
ffnbirred 2724
RgX_norml1_1 2814
RgX_is_FpXQX 2910
ZXQX_disc_all 3293
ZXQX_resultant_all 3339
ZXQX_resultant_bound 3342
nfX_disc 3485
_Fq_s 3558
ZXQX_resultant_bound_i 3612
charact_res 3732
ffmap_i 3822
get_Fq_field 4050
ZXQX_resultant_slice 4111
ZXQX_resultant_worker 4111
RgX_to_FpXQX 4122
FpXC_center 4652
ZM_init_CRT 5109
char_update_int 5700
Z_incremental_CRT 6287
fpinit_check 6377
ZM_incremental_CRT 6729
RgX_RgXY_ResBound 6762
FqM_to_FlxqM 7452
sqrN2 7494
_Fq_inv 7998
ZX_compositum 8290
ZX_compositum_lambda 8290
QXQ_charpoly 8393
ZX_ZXY_ResBound_1 8565
ZX_composedsum_i 8565
ZX_composedsum_slice 8791
ZX_composedsum_worker 8791
ZXQX_resultant_prime 9241
FqXY_eval 12534
Fq_powu 12900
QXQ_norm 16644
ZX_ZXY_resultant_LERS 19026
ZXQ_charpoly_sqf 19269
FqC_red 19492
Flx_resultant_set_dglist 20075
addii_abs 21726
characteristic 24015
ffinit_fact_Flx 24352
ZX_norml1_1 26899
flinit 27270
ZX_init_CRT 27702
QXQ_div 28363
FqX_Fq_translate 29040
FpXQX_FpXQ_translate 29045
FpXQX_FpXQ_translate_basecase 29045
FpXQX_normalize 32534
_Fq_equal0 32904
FqV_roots_to_pol 33910
ZX_ZXY_rnfequation_lambda 34692
Fq_Fp_mul 37718
RgX_to_FqX 39485
RgM_to_FqM 44850
init_Flxq_i 44851
init_Fq 46344
init_Fq_i 46827
ZX_resultant 47621
FqX_Fq_add 47856
ZX_ZXY_resultant_all 51379
ZX_ZXY_rnfequation 51771
Rg_is_FpXQ 52200
ZX_ZXY_resultant 67203
Fq_halve 67862
Fq_inv 76599
FqXY_evalx 81616
FqC_to_FlxqC 93511
FqV_red 93779
RgM_to_Flm 101396
QXQ_div_slice 104613
QXQ_div_worker 104613
ZX_ZXY_resultant_slice 107073
ZX_ZXY_resultant_worker 107073
monomialcopy 113023
QXQ_inv 124163
swap_vars 124963
flinit_check 127367
FqX_Fq_mul_to_monic 127759
ZX_incremental_CRT_raw 129723
ZX_ZXY_ResBound 141962
Fq_sqrtn 146388
log2N2 150527
charact 151380
QXQ_inv_slice 181211
QXQ_inv_worker 181211
RgC_to_FqC 187824
RgM_to_FpM 190617
_Fq_mul 208578
_Fq_red 259926
_Fq_neg 270024
pol_x_powers 276495
Fq_div 294678
_Fq_add 310734
ZX_ZXY_resultant_prime 316025
RgV_to_Flv 316286
Flx_FlxY_resultant_polint 318635
FqX_eval 329678
QXQ_sqr 348653
Fq_mulu 418384
Fq_sqr 521251
QXQ_mul 722171
FpXV_FpC_mul 729846
ZXX_ResBound 807484
ZXX_resultant_interp 807484
ZXX_resultant 807509
ZXX_resultant_slice 812321
ZXX_resultant_worker 812321
FlxX_resultant_polint 901614
ZXX_resultant_prime 901614
Fq_neg 911710
Fq_pow 919927
ZX_discbound 966688
ZX_disc 969435
ZXQ_charpoly 999921
ZX_disc_all 1022469
ZX_norml1 1052494
Rg_to_FpXQ 1105433
ZX_resultant_all 1147621
ZX_resultant_slice 1257065
ZX_resultant_worker 1257065
RgC_to_FpC 1501230
ZXX_is_sparse 1615008
RgX_is_ZXX 1615211
Fq_sqrt 1620624
resbound 1756930
Flx_resultant_all 1824680
FlxY_evalx_drop 1844755
gen_crt 1891064
gen_inccrt 2545260
RgX_to_FpX 2850038
ZX_resultant_prime 3093458
FlxY_eval_resultant 3513711
Fl_chinese_coprime 4520317
Flx_FlxY_eval_resultant 4798069
gen_inccrt_i 6974422
Fq_mul 7331756
Fq_sub 7368992
primelist 7460185
Fq_add 9923667
monomial 11169313
RgX_is_FpX 23295534
Rg_to_Fp 44769029
Rg_is_Fp 57028461

Generated by: LCOV version 1.16