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) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30702-bddb8d6928) Lines: 1095 1201 91.2 %
Date: 2026-02-23 02:23:56 Functions: 122 130 93.8 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl_ellcard_Shanks 218795
Fl_ellpoint 6228
Fl_elltrace 533326
Fl_elltrace_CM 999048
Fl_elltrace_naive 656776
Fle_add_inplace 4921807
Fle_dbl_inplace 194716
FpE_Miller 44
FpE_Miller_add 4
FpE_Miller_dbl 92
FpE_Miller_line 45
FpE_add 788423
FpE_add_ip 305694
FpE_add_slope 788427
FpE_changepoint 702
FpE_changepointinv 1530
FpE_chord_update 4
FpE_dbl 221804
FpE_dbl_slope 222330
FpE_log 42
FpE_mul 349
FpE_neg 310717
FpE_neg_i 0
FpE_order 643
FpE_sub 0
FpE_tangent_update 92
FpE_tatepairing 174
FpE_to_FpJ 169828
FpE_to_mod 126
FpE_vert 140
FpE_weilpairing 62544
FpJ_add 510907
FpJ_dbl 1711518
FpJ_mul 4908
FpJ_neg 0
FpJ_to_FpE 169396
FpXQE_Miller 54
FpXQE_Miller_add 486
FpXQE_Miller_dbl 3564
FpXQE_Miller_line 3990
FpXQE_add 215200
FpXQE_add_slope 215680
FpXQE_changepoint 1610
FpXQE_changepointinv 838
FpXQE_chord_update 486
FpXQE_dbl 226517
FpXQE_dbl_slope 230033
FpXQE_log 0
FpXQE_mul 802
FpXQE_neg 62855
FpXQE_neg_i 0
FpXQE_order 12
FpXQE_sub 0
FpXQE_tangent_update 3564
FpXQE_tatepairing 6
FpXQE_vert 4104
FpXQE_weilpairing 24
FpXQ_ellcard 7293
FpXQ_ellcard_i 7293
FpXQ_ellcard_supersingular 6
FpXQ_ellcardj 1446
FpXQ_ellgens 7
FpXQ_ellgroup 13
FpXQ_ellj 1473
FpXQ_elljissupersingular 141870
FpXQ_elltwist 720
FpXQ_ffellcard 7
FpXQ_is4power 6
FpXQ_is_quad 28740
FpX_quad_root 954
Fp_ellcard 2429244
Fp_ellcard_CM 2168640
Fp_ellcard_Shanks 79
Fp_ellgens 492
Fp_ellgroup 103470
Fp_ellj 84
Fp_ellj_get_CM 45513
Fp_ellj_nodiv 42636
Fp_ellj_to_a4a6 936
Fp_elljissupersingular 3081
Fp_ellpoint 0
Fp_elltwist 0
Fp_ffellcard 12606
Fp_jissupersingular 2245
Fp_path_extends_to_floor 353
FqX_quad_root 59212
Fq_ellcard_supersingular 18
Fq_elljissupersingular 900
Fq_path_extends_to_floor 4037
RgE_to_FpE 1530
RgE_to_FpXQE 838
_FpE_add 769152
_FpE_dbl 221804
_FpE_mul 763038
_FpE_pairorder 62334
_FpE_rand 159665
_FpJ_add 510907
_FpJ_dbl 1710624
_FpJ_mul 4908
_FpXQE_add 215200
_FpXQE_dbl 226517
_FpXQE_mul 70102
_FpXQE_pairorder 18
_FpXQE_rand 129
_fix 19196
affii2 9440
ap_cm 1200
ap_j0 85878
ap_j1728 2465256
ap_j287496 120
ap_j8000 114
closest_lift 218941
compare_multiples 12916581
ec_ap_cm 426468
ellinf_FpJ 38273
ellsupersingularj_FpXQ 1032
ellsupersingularj_easy_FpXQ 1014
elltrace_extension 13260
find_inert_disc 1014
get_FpE_group 774
get_FpXQE_group 14
get_table_size 79
is_CMj 564509
jissupersingular 12000
random_FpE 161711
random_FpXQE 930
random_nonsquare_Fp 360
random_nonsquare_FpXQ 720
u2_is_CMj 14579
uclosest_lift 225011

Generated by: LCOV version 1.16