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

Generated by: LCOV version 1.16