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 30347-cb65b7994e) Lines: 2597 2668 97.3 %
Date: 2025-06-27 09:22:08 Functions: 157 157 100.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
phi2_atkin11_ZV 7
phi2_atkin3_ZV 7
phi2_atkin7_ZV 7
phi2_atkin13_ZV 14
phi2_atkin19_ZV 14
phi2_atkin5_ZV 14
phi2_w3w13_ZV 14
phi2_atkin17_ZV 21
phi2_w3w3e2_ZV 21
phi3_f3_ZV 21
phi2_w3w5_ZV 35
phi3_w2w13_ZV 42
db_add_levels 45
phi5_w3w7_ZV 49
FpV_deriv 56
phi2_w5w7_ZV 56
phi5_w2w3_ZV 56
phi5_w3w3_ZV 63
weber_exponent 77
phi7_w2w5_ZV 91
phi2_g2_ZV 105
Fp_polmodular_evalx 126
modinv_parent 140
modinv_parent_power 140
polmodular0_powerup_ZM 140
phi3_w2w7_ZV 182
phi5_f_ZV 189
phi_w3w13_j 210
phi_atkin7_j 301
modinv_f3_from_j 358
double_eta_raw_to_Fp 455
phi_atkin11_j 470
polmodular 644
modinv_ramified 798
twelth_root 888
phi_atkin3_j 924
modinv_is_Weber 1008
phi_w2w3_j 1060
phi_w3w5_j 1147
Fp_modinv_to_j 1162
phi_atkin5_j 1190
phi_atkin19_j 1535
modinv_j_from_f 1844
phi5_ZV 1873
phi3_ZV 1903
phi_w2w13_j 2402
Flv_deriv_pre_inplace 2464
eval_modpoly_modp 2674
phi_atkin13_j 2682
phi_w5w7_j 2896
phi_w2w5_j 2927
phi_w3w7_j 2986
make_pcp_floor 3062
make_pcp_surface 3062
discriminant_with_classno_at_least 3183
modpoly_height_bound 3183
select_L0 3183
calc_primes_for_discriminants 3185
modpoly_pickD 3185
scanD0 3185
modinv_f_from_j 3196
phi_w3w3_j 3825
fourth_root 3926
phi_atkin17_j 4109
polmodular_db_add_levels 5263
eighth_root 5414
sixth_root 5721
modinv_j_from_2double_eta 6172
phi_w2w7_j 6635
double_eta_initial_js 6873
modinv_double_eta_from_j 6873
inflate_polys 10037
normalise_coeffs 10037
safe_abs_sqrt 10318
modpoly_pickD_primes 13321
modinv_pfilter 16506
polmodular_ZXX 19175
polmodular_ZM 19259
carray_reverse_inplace 19701
phi2_ZV 20008
modinv_double_eta_from_2j 20825
modfn_unambiguous_root 20903
polmodular_db_init 21485
sympol_to_ZM 24792
internal_db 24932
polmodular_small_ZM 24932
polmodular_db_add_level 26929
polmodular0_ZM 27982
modinv_max_internal_level 28101
Flx_double_eta_jpoly 32963
double_eta_power 32963
double_eta_Fl 34571
double_eta_raw 35299
double_eta_root 35433
Flv_powu_inplace_pre 39656
polmodular_split_p_Flm 40493
oneroot_of_classpoly 40500
polmodular_worker 40502
enum_volcano_surface 40508
get_Lsqr_cycle 40508
enum_volcano_floor 40510
root_matrix 40510
double_eta_raw_to_Fl 40743
modinv_level 41233
roots_to_coeffs 42863
interpolate_coeffs 43192
modinv_sparse_factor 46723
verify_L_sylow_is_cyclic 49473
orientation_ambiguity 55089
Flx_double_eta_xpoly 62268
modfn_preimage 67271
double_eta_exponent 68851
qform_primeform2 82199
compute_L_isogenous_curve 87888
select_curve_with_L_tors_point 87888
find_noniso_L_isogenous_curve 87889
Fl_mul5 96854
Fl_mul7 96855
Fle_quotient_from_kernel_generator 96857
qfb_nform 135919
find_L_tors_point 141425
mkqfis 142948
modfn_root 201331
primeform_discrete_log 214232
qfb_distinct_prods 230294
modinv_is_double_eta 254826
Flv_lastnonzero 337670
polmodular_db_for_inv 387402
polmodular_db_getp 558900
modinv_odd_conductor 574606
update_Lsqr_cycle 575469
vecsmall_pick 615972
append_neighbours 615980
modinv_good_atkin 707301
Fl_mul6 791013
check_generators 823820
Fl_mul8 887821
primeform_exp_order 1131074
qfb_is_two_torsion 1691074
Fl_mul4 1775536
disc_best_modinv 1907423
prime_to_conductor 3409462
red_primeform 3409462
Flm_Fl_phi3_evalx 3593422
Flm_Fl_phi5_evalx 5163213
Fl_addmul4 5173487
modinv_double_eta_good_disc 5312844
modinv_degree 7250371
Fl_addmul3 10767915
modinv_good_prime 11309899
modinv_good_disc 15215973
_qsort_cmp 15231414
modinv_height_factor 22917567
Fl_addmul5 25702083
Flm_Fl_phi2_evalx 28089957
Flm_Fl_polmodular_evalx 43954870
Fl_addmul2 59578644

Generated by: LCOV version 1.16