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 - Qfb.c (source / functions) Coverage Total Hit
Test: PARI/GP v2.18.1 lcov report (development 31042-0fbe168e69) Lines: 91.3 % 1264 1154
Test Date: 2026-07-23 17:04:59 Functions: 93.2 % 146 136
Legend: Lines:     hit not hit

Function Name Sort by function name Hit count Sort by function hit count
qfb_1 0
qfbcompraw_i 0
qfisolvep 0
qfr3_1 0
qfr3_powraw 0
qfr5_1 0
qfr_1_fill 0
qfr_red 0
qfrsolvep 0
quadgen 0
_qfimulraw 7
_qfisqrraw 7
qfbinv 7
qfi_rho 7
qfipowraw 7
qfr5_powraw 7
qfr_boundcf 7
qfr_cf 7
qfrinvraw 7
qfrpowraw 14
qfbpowraw 21
qfr5_pow 21
qfr_1 35
qfr_disc 35
qfrsqr0 35
qfr_red_av 63
qfb_comp_gen 84
qfrpow 112
qfr5_init 140
rhoi_cf 175
qfr3_init 420
qfrcomp0 441
qfr_red_basecase_i 476
qfr_red_i 476
qfr5_to_qfr 532
quadgen0 623
nupow 1008
quadpoly0 1071
qfr_data_init 2170
check_quaddisc_imag 2184
qfbcompraw 2198
quadpoly 2205
qfr3_pow 4557
mul_nucomp 4739
famat_divsqr 5299
qfr_1_by_disc 6867
check_quaddisc_real 6916
qfbcornacchia 7630
qfbsolve_all 10227
mul_nudupl 11606
nudupl 11648
qfr3_to_qfr 31969
cornacchia2_sqrt 35483
allsols 48083
cornacchia 55328
GL2_qfb_equal 61068
pqfbred_basecase 65097
qfb3_SL2_apply 65308
Qfb0 77259
qfbred 92214
qfbred0 94076
qfbsqr 128962
pqfbred_iter_1 131244
pqfbred_rec 131244
qfb_minexpi 132294
primeform 135595
qfbcomp 138644
qfb3 142504
qfr5_dist 184688
check_quaddisc 203877
qfr_redsl2 209575
qfr_to_qfr5 217728
qfisolvep_all 223125
quadpoly_i 243467
quadpoly_ii 245665
SL2_div_mul_e1 344323
nucomp 400722
parteucl 412328
qfbredsl2 519893
qfbsqr_i 694003
qfi_1 763241
qfrsolve_normform 770126
qfi_1_by_disc 775335
is_qfi 814212
qfisqr0 822930
qfr_redsl2_basecase 979701
qfi_red_1_b0 982592
qfr3_comp 1009397
qfr3_compraw 1009397
quadpoly_bc 1021000
qfb_inv 1042687
setq_b0 1137401
qfr3_rho 1139460
qfr3_red 1172882
qfisolve_normform 1445682
qfbpows 1472324
qfbpow 1626395
qfr5_comp 1735216
qfr5_compraw 1735230
known_prime 1863022
qfr5_red 1952895
pqfbred_1 2085300
check_qfbext 2131138
qfsolve_normform 2215808
is_minimal 2217733
cornacchia2 2561278
lastqi 2595837
cornacchia2_i 2595851
normforms 2620772
REDB 2776818
qfbsolve_primitive 2828371
qfb_initrd 2838598
qfbsolve 2838605
qfbsolve_primitive_i 2843897
redimagsl2 4883969
qfi_redsl2 5194280
lti2n 5357816
qfi_redsl2_basecase 6784631
qfr5_rho 8486681
_qfimul 9607916
fix_expo 10217928
qfr_rhosl2 10810674
qfbpow_i 10898367
qfbred_i 11761409
qfipow 12524650
qfr_rhosl2_i 13379357
rho_get_BC 14152587
REDBU 14157125
primeform_u 15083067
dvmdii_round 16933943
ab_isreduced 17713057
qfi_red 19339781
qfb_equal 23783634
_qfisqr 25031250
qfb_sqr 27236445
qfbcomp_i 38663194
qficomp0 73442691
qfb_comp 76187759
setq 92687076
qfi_red_1 93824477
qfi_red_av 94015952
qfi_red_basecase_av 94015952
qfi_red_fast 99420178
qfb_maxexpi 99746689
dvmdsu_round 120856302
sREDB 120856302

Generated by: LCOV version 2.0-1