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 - FpE.c (source / functions) Coverage Total Hit
Test: PARI/GP v2.18.1 lcov report (development 31042-0fbe168e69) Lines: 89.4 % 1277 1142
Test Date: 2026-07-23 17:04:59 Functions: 92.0 % 137 126
Legend: Lines:     hit not hit

Function Name Sort by function name Hit count Sort by function hit count
Fl_ellcard_Shanks 430292
Fl_ellpoint 12379
Fl_elltrace 816583
Fl_elltrace_CM 1362518
Fl_elltrace_naive 790606
Fle_add_inplace 8113879
Fle_dbl_inplace 381094
FpE_Miller 44
FpE_Miller_add 4
FpE_Miller_dbl 92
FpE_Miller_line 45
FpE_add 916615
FpE_add_ip 305694
FpE_add_slope 916619
FpE_changepoint 1725
FpE_changepointinv 2733
FpE_chord_update 4
FpE_dbl 258747
FpE_dbl_slope 259341
FpE_log 49
FpE_mul 1316
FpE_neg 362490
FpE_neg_i 0
FpE_order 737
FpE_sub 0
FpE_tangent_update 92
FpE_tatepairing 203
FpE_to_FpJ 198953
FpE_to_mod 1053
FpE_vert 140
FpE_weilpairing 72968
FpJ_add 1131042
FpJ_dbl 6346434
FpJ_mul 5726
FpJ_neg 0
FpJ_to_FpE 198419
FpXQE_Miller 63
FpXQE_Miller_add 567
FpXQE_Miller_dbl 4158
FpXQE_Miller_line 4655
FpXQE_add 221956
FpXQE_add_slope 222516
FpXQE_changepoint 942
FpXQE_changepointinv 42
FpXQE_chord_update 567
FpXQE_dbl 68504
FpXQE_dbl_slope 72606
FpXQE_log 0
FpXQE_mul 0
FpXQE_neg 73329
FpXQE_neg_i 0
FpXQE_order 14
FpXQE_sub 0
FpXQE_tangent_update 4158
FpXQE_tatepairing 7
FpXQE_vert 4788
FpXQE_weilpairing 28
FpXQV_ell_to_a4a6 0
FpXQV_ellcard 0
FpXQV_ellcharpoly 231
FpXQV_initsmall5 231
FpXQ_ellcard 8508
FpXQ_ellcard_i 8508
FpXQ_ellcard_supersingular 7
FpXQ_ellcardj 1687
FpXQ_ellgens 8
FpXQ_ellgroup 15
FpXQ_ellj 1718
FpXQ_elljissupersingular 165508
FpXQ_elltwist 840
FpXQ_ffellcard 8
FpXQ_is4power 7
FpXQ_is_quad 33523
FpX_quad_root 1244
Fp_ellcard 5196303
Fp_ellcard_CM 4890331
Fp_ellcard_Shanks 79
Fp_ellgens 574
Fp_ellgroup 120715
Fp_ellj 98
Fp_ellj_get_CM 54138
Fp_ellj_nodiv 50596
Fp_ellj_to_a4a6 1092
Fp_elljissupersingular 3780
Fp_ellpoint 0
Fp_elltwist 0
Fp_ffellcard 14637
Fp_jissupersingular 2788
Fp_path_extends_to_floor 455
FqX_quad_root 71367
Fq_ellcard_supersingular 21
Fq_elljissupersingular 1043
Fq_path_extends_to_floor 4881
RgE_is_FpE 1088
RgE_is_FpXQE 249340
RgE_to_FpE 2733
RgE_to_FpXQE 42
_FpE_add 897344
_FpE_dbl 258747
_FpE_mul 891006
_FpE_pairorder 72723
_FpE_rand 186277
_FpJ_add 1131042
_FpJ_dbl 6345391
_FpJ_mul 5726
_FpXQE_add 221956
_FpXQE_dbl 68504
_FpXQE_mul 80841
_FpXQE_pairorder 21
_FpXQE_rand 147
_fix 19196
affii2 9440
ap_cm 1456
ap_j0 134287
ap_j1728 5201788
ap_j287496 147
ap_j8000 133
closest_lift 430436
compare_multiples 17772166
ec_ap_cm 497964
ell_to_a4a6_FpXQ 1726
ellinf_FpJ 44635
ellsupersingularj_FpXQ 1204
ellsupersingularj_easy_FpXQ 1183
elltrace_extension 15400
find_inert_disc 1183
get_FpE_group 903
get_FpXQE_group 16
get_table_size 79
is_CMj 673868
jissupersingular 14007
random_FpE 188664
random_FpXQE 1081
random_nonsquare_Fp 420
random_nonsquare_FpXQ 840
u2_is_CMj 14806
uclosest_lift 442657

Generated by: LCOV version 2.0-1