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 30766-abc2a9856c) Lines: 1904 2201 86.5 %
Date: 2026-03-27 09:27:04 Functions: 205 228 89.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl_chinese_coprime 5163171
FlxX_pseudorem 7348
FlxX_resultant 0
FlxX_resultant_polint 1118150
FlxX_resultant_pre 0
FlxX_resultant_subres 2459
FlxY_eval_resultant 4348232
FlxY_evalx_drop 2114353
FlxY_to_FlyX 6071
Flx_FlxY_eval_resultant 5519760
Flx_FlxY_resultant 6071
Flx_FlxY_resultant_polint 367277
Flx_Lazard 1933
Flx_resultant_all 2090571
Flx_resultant_set_dglist 23719
FpXC_center 5467
FpXM_center 1800
FpXQX_FpXQ_translate 33887
FpXQX_FpXQ_translate_basecase 33887
FpXQX_XpN_powu 0
FpXQX_normalize 38189
FpXV_FpC_mul 851487
FpXV_composedsum 1588
FpXY_FpXQ_evaly 2072
FpX_FpXY_eval_resultant 284
FpX_FpXY_resultant 15
FpX_Fp_translate 1134
FpX_Fp_translate_basecase 700
FpX_composedprod 0
FpX_composedsum 93
Fp_XpN_powu 434
FqC_FqV_mul 105
FqC_Fq_mul 0
FqC_add 0
FqC_red 24058
FqC_sub 0
FqC_to_FlxqC 109022
FqM_add 0
FqM_red 1701
FqM_sub 0
FqM_to_FlxqM 8708
FqV_red 109462
FqV_roots_to_pol 40455
FqXQ_matrix_pow 0
FqXQ_powers 0
FqXY_eval 14623
FqXY_evalx 97391
FqX_Fq_add 55832
FqX_Fq_mul_to_monic 149052
FqX_Fq_sub 1059
FqX_Fq_translate 33880
FqX_eval 391145
Fq_Fp_mul 43985
Fq_add 11593382
Fq_div 343791
Fq_halve 81417
Fq_inv 89298
Fq_invsafe 0
Fq_mul 8609162
Fq_mulu 490264
Fq_neg 1080344
Fq_neg_inv 0
Fq_pow 1088222
Fq_powu 15050
Fq_sqr 611236
Fq_sqrt 1893010
Fq_sqrtn 170786
Fq_sub 8563004
QXQ_charpoly 9793
QXQ_div 33207
QXQ_div_slice 121142
QXQ_div_worker 121143
QXQ_intnorm 0
QXQ_inv 146001
QXQ_inv_slice 212723
QXQ_inv_worker 212723
QXQ_mul 845486
QXQ_norm 19418
QXQ_sqr 407059
QX_disc 7
QX_resultant 56
RgC_to_FpC 1751090
RgC_to_FqC 219128
RgM_is_FpM 0
RgM_to_Flm 118296
RgM_to_FpM 222349
RgM_to_FqM 52325
RgV_is_FpV 0
RgV_to_Flv 369001
RgV_to_FpV 140
RgX_RgXY_ResBound 8207
RgX_RgXY_ResBound_1 854
RgX_is_FpX 28216366
RgX_is_FpXQX 22974
RgX_is_ZXX 2021502
RgX_norml1_1 3283
RgX_to_FpX 3334075
RgX_to_FpXQX 3887
RgX_to_FqX 49200
Rg_is_Fp 73378446
Rg_is_FpXQ 193571
Rg_to_Fp 52389350
Rg_to_FpXQ 1288276
ZM_incremental_CRT 7787
ZM_init_CRT 5985
ZXM_incremental_CRT 653
ZXM_init_CRT 679
ZXQXQ_minpoly 0
ZXQXQ_minpoly_slice 0
ZXQXQ_minpoly_worker 0
ZXQX_composedsum 315
ZXQX_composedsum_bound 315
ZXQX_composedsum_slice 359
ZXQX_composedsum_worker 359
ZXQX_disc_all 3941
ZXQX_resultant_all 4004
ZXQX_resultant_bound 4007
ZXQX_resultant_bound_i 4322
ZXQX_resultant_prime 11041
ZXQX_resultant_slice 4925
ZXQX_resultant_worker 4925
ZXQ_charpoly 1247235
ZXQ_charpoly_sqf 22600
ZXQ_minpoly 1701
ZXQ_minpoly_slice 3523
ZXQ_minpoly_worker 3523
ZXX_ResBound 1010588
ZXX_is_sparse 2021235
ZXX_resultant 1010625
ZXX_resultant_interp 1010590
ZXX_resultant_prime 1118150
ZXX_resultant_slice 1015893
ZXX_resultant_worker 1015893
ZX_ZXY_ResBound 165970
ZX_ZXY_ResBound_1 10218
ZX_ZXY_resultant 78557
ZX_ZXY_resultant_LERS 22337
ZX_ZXY_resultant_all 60116
ZX_ZXY_resultant_prime 363666
ZX_ZXY_resultant_slice 124317
ZX_ZXY_resultant_worker 124317
ZX_ZXY_rnfequation 60554
ZX_ZXY_rnfequation_lambda 40509
ZX_composedsum 511
ZX_composedsum_i 10218
ZX_composedsum_slice 10483
ZX_composedsum_worker 10484
ZX_compositum 9709
ZX_compositum_lambda 9709
ZX_disc 1143879
ZX_disc_all 1205944
ZX_discbound 1140632
ZX_incremental_CRT 0
ZX_incremental_CRT_raw 148352
ZX_init_CRT 32466
ZX_norml1 1296834
ZX_norml1_1 32068
ZX_resultant 55867
ZX_resultant_all 1352839
ZX_resultant_prime 3870538
ZX_resultant_slice 1498493
ZX_resultant_worker 1498520
Z_incremental_CRT 7525
Z_init_CRT 357
_FpX_composedsum 93
_Fq_add 362523
_Fq_equal0 38388
_Fq_inv 9331
_Fq_mul 243341
_Fq_neg 315028
_Fq_red 303247
_Fq_s 4151
_ZXQ_powu 56
addii_abs 25974
char_update_int 5873
char_update_prime 1225
charact 175105
charact_res 4137
characteristic 28007
checkmap 2261
err_compo 84
ffcompomap 420
ffeltmap_i 2709
ffeltmaprel_i 252
ffembed 189
ffextend 91
fffrobenius 42
ffinit 567
ffinit_Artin_Schreier 947
ffinit_Artin_Schreier_2 590
ffinit_fact 1588
ffinit_fact_Flx 28966
ffinit_rand 0
ffinvmap 133
ffmap 1036
ffmap_i 4459
ffmaprel 252
ffmaprel_i 252
ffnbirred 3178
ffnbirred0 140
ffpartmapimage 1260
ffsumnbirred 616
flinit 31902
flinit_check 149469
fpinit 1681
fpinit_check 7332
gen_crt 2288130
gen_inccrt 3075783
gen_inccrt_i 8788863
get_Fq_field 4725
init_Flxq 0
init_Flxq_i 52932
init_Fq 54642
init_Fq_i 55209
log2N2 176189
monomial 12542232
monomialcopy 156275
nfX_disc 4172
nfX_resultant 119
nf_direct_compositum 315
pol_x_powers 325897
primelist 9377011
resbound 2187125
residual_characteristic 336
sqrN2 9061
swap_vars 146151
to_ZX 252
vecbinomial_Fp 0

Generated by: LCOV version 1.16