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 - RgX.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30563-682842a727) Lines: 1631 1787 91.3 %
Date: 2025-11-29 09:23:24 Functions: 205 223 91.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Kronecker_to_mod 185965
QXQC_to_mod_shallow 14854
QXQM_to_mod_shallow 6720
QXQV_to_mod 22341
QXQXV_to_mod 12733
QXQX_homogenous_evalpow 1652
QXQX_to_mod 37471
QXQX_to_mod_shallow 204096
QXQ_powers 9597
QXQ_to_mod 169946
QXQ_to_mod_shallow 840695
QXV_QXQ_eval 3248
QXY_QXQ_evalx 371
QX_ZXQV_eval 7637
RgM_to_RgXV 303248
RgM_to_RgXV_reverse 7202
RgM_to_RgXX 23686
RgV_to_RgM 336720
RgV_to_RgX 2289106
RgV_to_RgX_reverse 188283
RgXQC_red 68187
RgXQM_mul 322
RgXQM_red 13195
RgXQV_RgXQ_mul 133
RgXQV_factorback 7118
RgXQV_red 1414
RgXQX_RgXQ_mul 35
RgXQX_RgXQ_translate 33584
RgXQX_divrem 156857
RgXQX_mul 0
RgXQX_powers 0
RgXQX_pseudodivrem 12063
RgXQX_pseudorem 138870
RgXQX_red 508139
RgXQX_sqr 0
RgXQ_matrix_pow 2940
RgXQ_norm 2680
RgXQ_pow 102160
RgXQ_powers 8610
RgXQ_powu 120505
RgXQ_trace 476
RgXV_RgV_eval 2947
RgXV_maxdegree 588
RgXV_prod 0
RgXV_rescale 2401
RgXV_to_RgM 79032
RgXV_unscale 6558
RgXX_to_RgM 322
RgXY_degreex 2022636
RgXY_derivx 3836
RgXY_swap 2051
RgXY_swapspec 32779
RgX_RgV_eval 166768
RgX_RgXQV_eval 0
RgX_RgXQ_eval 417522
RgX_RgXnV_eval 966
RgX_RgXn_eval 0
RgX_Rg_add 42746756
RgX_Rg_add_shallow 65100
RgX_Rg_div 30730164
RgX_Rg_divexact 5262229
RgX_Rg_eval_bk 0
RgX_Rg_mul 199291267
RgX_Rg_sub 1226085
RgX_Rg_translate 6071923
RgX_Rg_translate_FpX 0
RgX_Rg_translate_FpXQX 7
RgX_Rg_translate_basecase 5710178
RgX_Rg_translate_fast 6071924
RgX_Rg_translate_i 5710369
RgX_add 143435353
RgX_addmulXn 514863
RgX_addmulXn_shallow 9531008
RgX_addspec 222393
RgX_addspec_shallow 8855292
RgX_affine 30226
RgX_blocks 2794675
RgX_deflate 1187994
RgX_deriv 830958
RgX_digits 3157
RgX_div_by_X_x 265528
RgX_divrem 14181147
RgX_divrem_i 23432951
RgX_divs 2863
RgX_equal 24799455
RgX_even_odd 49765392
RgX_homogenize 18732
RgX_homogenize_deg 1260
RgX_homogenous_evalpow 399004
RgX_inflate 885398
RgX_integXn 56377
RgX_liftred 454903
RgX_mul 105485342
RgX_mul2n 65268
RgX_mulXn 2997279
RgX_mul_FpX 609812
RgX_mul_FpXQX 2079
RgX_mul_QXQX 170888
RgX_mul_fast 119266133
RgX_mul_i 38851077
RgX_mul_normalized 1721050
RgX_mulhigh_i 2677871
RgX_mulhigh_i2 1595393
RgX_muls 3992
RgX_mulspec 40287669
RgX_mulspec_basecase 34221247
RgX_mulspec_basecase_limb 111359903
RgX_neg 7451881
RgX_normalize 39711
RgX_pseudodivrem 11818
RgX_pseudorem 138870
RgX_recip 31423
RgX_recip_i 3751161
RgX_recip_shallow 59388
RgX_recipspec_shallow 2583412
RgX_rem 14700285
RgX_rem_FpX 68327
RgX_rem_FpXQX 70
RgX_rem_QXQX 49851
RgX_rem_fast 14700270
RgX_renormalize_lg 7899128
RgX_rescale 4344628
RgX_rotate_shallow 317037
RgX_shift 1578036
RgX_shift_shallow 177400483
RgX_splitting 43631
RgX_sqr 1299308
RgX_sqr_FpX 1407
RgX_sqr_FpXQX 196
RgX_sqr_QXQX 13425
RgX_sqr_fast 1311460
RgX_sqr_i 37961
RgX_sqrhigh_i 0
RgX_sqrhigh_i2 0
RgX_sqrspec 38039
RgX_sqrspec_basecase 38000
RgX_sqrspec_basecase_limb 100082
RgX_sub 72861409
RgX_to_RgC 15070096
RgX_unscale 52307
RgX_val 3678154
RgX_valrem 80753183
RgX_valrem_inexact 852370
RgXnV_red_shallow 483
RgXn_div 584450
RgXn_div_FpX 119
RgXn_div_FpXQX 7
RgXn_div_fast 1286750
RgXn_div_gen 2192937
RgXn_div_i 1286750
RgXn_eval 5593
RgXn_exp 0
RgXn_expint 52919
RgXn_inv 807482
RgXn_inv_FpX 91
RgXn_inv_FpXQX 0
RgXn_inv_fast 906403
RgXn_inv_i 906403
RgXn_mul 11102912
RgXn_mul2 9453356
RgXn_mul_basecase 6658643
RgXn_mulhigh 2621480
RgXn_powers 483
RgXn_powu 0
RgXn_powu_i 2286
RgXn_recip_shallow 642736
RgXn_red_shallow 7950631
RgXn_reverse 154
RgXn_sqr 12152
RgXn_sqr2 315
RgXn_sqr_basecase 0
RgXn_sqrhigh 14
RgXn_sqrt 7
RgXspec_kill0 81797612
Rg_RgX_sub 4954456
Rg_get_0 6942982
Rg_get_1 156959569
Rg_to_RgC 1360827
ZXQX_dvd 17734
ZXQ_powers 12152
ZXQ_powu 168435
ZX_unscale 674286
ZX_unscale2n 1974226
ZX_unscale_div 12997
ZX_unscale_divpow 1393
ZX_z_unscale 1171635
_RgX_divrem 11333
_RgX_mul 0
_ZXQmul 111175
_ZXQsqr 200532
_add 623398
_cmul 1040654
_gen_add 19653502
_gen_cmul 512818
_gen_mul 1974738
_gen_nored 2150692
_gen_one 2193576
_gen_sqr 635482
_gen_sub 0
_gen_zero 24184
_mul 281002
_mulXn 4528
_one 1019735
_oneXn 1939
_pow 88307
_red 724302
_sqr 74880
_sqrXn 11893
_sub 0
_zero 1232
_zeroXn 0
brent_kung_optpow 19611288
do_QXQ_eval 3619
gen_RgXQ_eval_powers 14037266
gen_bkeval 881556
gen_bkeval_powers 12145524
get_Rg_algebra 294988
rem 1050976
rfrac_deflate 140
rfrac_deflate_max 140
rfrac_deflate_order 140
zero_FpXQX_mod 616
zero_FpX_mod 102627

Generated by: LCOV version 1.16