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 30584-b9873745ba) Lines: 2651 2817 94.1 %
Date: 2025-12-21 09:21:02 Functions: 157 163 96.3 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl_addmul2 64588566
Fl_addmul3 13209978
Fl_addmul4 5173798
Fl_addmul5 25727581
Fl_mul4 1852649
Fl_mul5 97812
Fl_mul6 828640
Fl_mul7 97810
Fl_mul8 926407
Fle_quotient_from_kernel_generator 97820
Flm_Fl_phi2_evalx 30217872
Flm_Fl_phi3_evalx 4415716
Flm_Fl_phi5_evalx 5163343
Flm_Fl_polmodular_evalx 46772412
Flv_deriv_pre_inplace 2464
Flv_lastnonzero 330545
Flv_powu_inplace_pre 38567
Flx_double_eta_jpoly 31102
Flx_double_eta_xpoly 53900
FpV_deriv 56
Fp_modinv_to_j 1043
Fp_polmodular_evalx 126
_qsort_cmp 14885722
append_neighbours 666798
calc_primes_for_discriminants 3110
carray_reverse_inplace 20041
check_generators 801857
compute_L_isogenous_curve 89163
db_add_levels 24
disc_best_modinv 1907423
discriminant_with_classno_at_least 3108
double_eta_Fl 30000
double_eta_exponent 62319
double_eta_initial_js 6102
double_eta_power 31102
double_eta_raw 30637
double_eta_raw_to_Fl 36399
double_eta_raw_to_Fp 357
double_eta_root 30861
eighth_root 4720
enum_volcano_floor 41531
enum_volcano_surface 41531
eval_modpoly_modp 2674
find_L_tors_point 143017
find_noniso_L_isogenous_curve 89158
fourth_root 3926
get_Lsqr_cycle 41534
inflate_polys 9646
internal_db 24918
interpolate_coeffs 44096
make_pcp_floor 2986
make_pcp_surface 2986
mkqfis 148267
modfn_preimage 70862
modfn_root 201533
modfn_unambiguous_root 17875
modinv_degree 7402207
modinv_double_eta_from_2j 17797
modinv_double_eta_from_j 6102
modinv_double_eta_good_disc 5468111
modinv_f3_from_j 168
modinv_f_from_j 3147
modinv_good_atkin 633269
modinv_good_disc 15105575
modinv_good_prime 11087945
modinv_height_factor 22899706
modinv_is_Weber 1029
modinv_is_double_eta 250647
modinv_j_from_2double_eta 6398
modinv_j_from_f 1830
modinv_level 40735
modinv_max_internal_level 28012
modinv_odd_conductor 547932
modinv_parent 140
modinv_parent_power 140
modinv_pfilter 15673
modinv_ramified 700
modinv_sparse_factor 47600
modpoly_height_bound 3108
modpoly_pickD 3110
modpoly_pickD_primes 12563
normalise_coeffs 9646
oneroot_of_classpoly 41523
orientation_ambiguity 43897
phi2_ZV 20015
phi2_atkin11_ZV 0
phi2_atkin13_ZV 0
phi2_atkin17_ZV 0
phi2_atkin19_ZV 0
phi2_atkin23_ZV 7
phi2_atkin29_ZV 14
phi2_atkin31_ZV 14
phi2_atkin3_ZV 7
phi2_atkin5_ZV 7
phi2_atkin7_ZV 14
phi2_g2_ZV 98
phi2_w3w13_ZV 14
phi2_w3w3e2_ZV 21
phi2_w3w5_ZV 35
phi2_w5w7_ZV 70
phi3_ZV 1910
phi3_f3_ZV 14
phi3_w2w13_ZV 49
phi3_w2w7_ZV 182
phi5_ZV 1880
phi5_f_ZV 175
phi5_w2w3_ZV 56
phi5_w3w3_ZV 63
phi5_w3w7_ZV 42
phi7_w2w5_ZV 91
phi_atkin11_j 0
phi_atkin13_j 224
phi_atkin17_j 672
phi_atkin19_j 0
phi_atkin23_j 504
phi_atkin29_j 2039
phi_atkin31_j 2222
phi_atkin3_j 931
phi_atkin5_j 287
phi_atkin7_j 273
phi_w2w13_j 2755
phi_w2w3_j 1060
phi_w2w5_j 2500
phi_w2w7_j 6165
phi_w3w13_j 210
phi_w3w3_j 3882
phi_w3w5_j 1159
phi_w3w7_j 2412
phi_w5w7_j 3342
polmodular 651
polmodular0_ZM 27893
polmodular0_powerup_ZM 140
polmodular_ZM 19266
polmodular_ZXX 19182
polmodular_db_add_level 26022
polmodular_db_add_levels 5012
polmodular_db_for_inv 377007
polmodular_db_getp 547227
polmodular_db_init 21492
polmodular_small_ZM 24918
polmodular_split_p_Flm 41521
polmodular_worker 41527
prime_to_conductor 3464791
primeform_discrete_log 209086
primeform_exp_order 1100301
qfb_distinct_prods 231183
qfb_is_two_torsion 1697990
qfb_nform 144557
qform_primeform2 84195
red_primeform 3464791
root_matrix 41534
roots_to_coeffs 43768
safe_abs_sqrt 9840
scanD0 3110
select_L0 3108
select_curve_with_L_tors_point 89163
sixth_root 5340
sympol_to_ZM 24778
twelth_root 893
update_Lsqr_cycle 625253
vecsmall_pick 666780
verify_L_sylow_is_cyclic 50180
weber_exponent 63

Generated by: LCOV version 1.16