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 - polmodular.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30702-bddb8d6928) Lines: 2651 2817 94.1 %
Date: 2026-02-23 02:23:56 Functions: 157 163 96.3 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl_addmul2 49744743
Fl_addmul3 10151715
Fl_addmul4 3993890
Fl_addmul5 19969450
Fl_mul4 1396542
Fl_mul5 73649
Fl_mul6 624622
Fl_mul7 73649
Fl_mul8 698271
Fle_quotient_from_kernel_generator 73649
Flm_Fl_phi2_evalx 23180419
Flm_Fl_phi3_evalx 3383905
Flm_Fl_phi5_evalx 3993890
Flm_Fl_polmodular_evalx 35684346
Flv_deriv_pre_inplace 1760
Flv_lastnonzero 242158
Flv_powu_inplace_pre 28299
Flx_double_eta_jpoly 23356
Flx_double_eta_xpoly 41906
FpV_deriv 40
Fp_modinv_to_j 894
Fp_polmodular_evalx 90
_qsort_cmp 11157195
append_neighbours 508429
calc_primes_for_discriminants 2331
carray_reverse_inplace 14858
check_generators 600588
compute_L_isogenous_curve 67306
db_add_levels 20
disc_best_modinv 1634934
discriminant_with_classno_at_least 2329
double_eta_Fl 23225
double_eta_exponent 47543
double_eta_initial_js 4544
double_eta_power 23356
double_eta_raw 23743
double_eta_raw_to_Fl 28087
double_eta_raw_to_Fp 306
double_eta_root 23881
eighth_root 3457
enum_volcano_floor 31381
enum_volcano_surface 31381
eval_modpoly_modp 1910
find_L_tors_point 107991
find_noniso_L_isogenous_curve 67306
fourth_root 2860
get_Lsqr_cycle 31381
inflate_polys 7158
internal_db 20548
interpolate_coeffs 33262
make_pcp_floor 2245
make_pcp_surface 2245
mkqfis 112214
modfn_preimage 53674
modfn_root 151764
modfn_unambiguous_root 14189
modinv_degree 6277255
modinv_double_eta_from_2j 14137
modinv_double_eta_from_j 4544
modinv_double_eta_good_disc 4621426
modinv_f3_from_j 120
modinv_f_from_j 2330
modinv_good_atkin 541839
modinv_good_disc 12742204
modinv_good_prime 8319550
modinv_height_factor 19627531
modinv_is_Weber 825
modinv_is_double_eta 190287
modinv_j_from_2double_eta 4862
modinv_j_from_f 1310
modinv_level 32828
modinv_max_internal_level 22865
modinv_odd_conductor 411365
modinv_parent 102
modinv_parent_power 102
modinv_pfilter 11762
modinv_ramified 553
modinv_sparse_factor 35939
modpoly_height_bound 2329
modpoly_pickD 2331
modpoly_pickD_primes 9431
normalise_coeffs 7158
oneroot_of_classpoly 31381
orientation_ambiguity 33746
phi2_ZV 16829
phi2_atkin11_ZV 0
phi2_atkin13_ZV 0
phi2_atkin17_ZV 0
phi2_atkin19_ZV 0
phi2_atkin23_ZV 6
phi2_atkin29_ZV 12
phi2_atkin31_ZV 12
phi2_atkin3_ZV 5
phi2_atkin5_ZV 5
phi2_atkin7_ZV 11
phi2_g2_ZV 77
phi2_w3w13_ZV 10
phi2_w3w3e2_ZV 15
phi2_w3w5_ZV 25
phi2_w5w7_ZV 52
phi3_ZV 1456
phi3_f3_ZV 10
phi3_w2w13_ZV 38
phi3_w2w7_ZV 134
phi5_ZV 1440
phi5_f_ZV 125
phi5_w2w3_ZV 40
phi5_w3w3_ZV 48
phi5_w3w7_ZV 30
phi7_w2w5_ZV 66
phi_atkin11_j 0
phi_atkin13_j 192
phi_atkin17_j 576
phi_atkin19_j 0
phi_atkin23_j 432
phi_atkin29_j 1748
phi_atkin31_j 1905
phi_atkin3_j 767
phi_atkin5_j 238
phi_atkin7_j 224
phi_w2w13_j 2239
phi_w2w3_j 758
phi_w2w5_j 1837
phi_w2w7_j 4548
phi_w3w13_j 150
phi_w3w3_j 3091
phi_w3w5_j 831
phi_w3w7_j 1724
phi_w5w7_j 2483
polmodular 465
polmodular0_ZM 22780
polmodular0_powerup_ZM 102
polmodular_ZM 16293
polmodular_ZXX 16230
polmodular_db_add_level 19752
polmodular_db_add_levels 3842
polmodular_db_for_inv 285462
polmodular_db_getp 412201
polmodular_db_init 18068
polmodular_small_ZM 20548
polmodular_split_p_Flm 31381
polmodular_worker 31381
prime_to_conductor 2895932
primeform_discrete_log 156249
primeform_exp_order 824941
qfb_distinct_prods 185247
qfb_is_two_torsion 1420142
qfb_nform 123857
qform_primeform2 63673
red_primeform 2895932
root_matrix 31381
roots_to_coeffs 33023
safe_abs_sqrt 7238
scanD0 2331
select_L0 2329
select_curve_with_L_tors_point 67306
sixth_root 4171
sympol_to_ZM 20446
twelth_root 636
update_Lsqr_cycle 477048
vecsmall_pick 508429
verify_L_sylow_is_cyclic 37724
weber_exponent 54

Generated by: LCOV version 1.16