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 - elliptic.c (source / functions) Coverage Total Hit
Test: PARI/GP v2.18.1 lcov report (development 31041-bd73e9fcdd) Lines: 94.2 % 4183 3940
Test Date: 2026-07-22 22:45:42 Functions: 97.8 % 371 363
Legend: Lines:     hit not hit

Function Name Sort by function name Hit count Sort by function hit count
CM_factor 14
F2_card 5915
F3_card 7665
FF_ellinit_ns 121337
Fl_c4_to_a4 1724627
Fl_c4c6_to_a4a6 1644666
Fl_c6_to_a6 1645421
Fl_ell_to_a4a6 1644916
FljV_changepointinv_pre 15322
FljV_vecsat 11438
FljV_vecsat_Prickett 2807
FljV_vecsat_Siksek 8631
Flv_firstnonzero 147
Fq_c4_to_a4 93274
Fq_c4c6_to_a4a6 93269
QEV_to_ZJV 4460
QE_to_ZJ 33680
Q_numer 157580
Q_to_globalred 980
Q_to_minimalprimes 29554
RgE2_Fp_init 497
ZV_is_ei 4214
Z_gcd_primes 989310
Zec_h_evalx 1021405
ZtoF2 1848
_hell 20468
_mul 618017
_sqr 1897129
a4a6_ch 151083
a4a6_ch_Fl 91290
akell 693
apk_good 735
approx_mod2 140616
approx_mod3 70308
aux 1723309
aux2 2773358
base_ring 1449175
bilhell 7
bilhell_i 21
bnf_get_v 63
c4_to_a4 5245777
c4c6_to_a4a6 5245790
cardmod2 5894
cardmod3 7525
ch_FF 126
ch_Fp 7
ch_Fq 119
ch_NF 140574
ch_Q 90748
ch_Qp 21
ch_R 90748
ch_Rg 7
checkell 10098577
checkell5 228788
checkell_Fq 254244
checkell_Q 8372
checkell_Qp 0
checkell_int 693
checkellisog 3752
checkellp 5472356
checkellpt 0
checkellpt_i 5629166
checkellpts 192114
chk_p 99596
coordch 213157
coordch_r 1264669
coordch_rst 751128
coordch_s 231210
coordch_st 751128
coordch_t 683326
coordch_uinv 229824
direllnf_worker 4956
doellGm 146454
doellR_ab 58842
doellR_roots 170170
doellR_roots_i 231577
doellcard 224104
doellff_get_o 19292
doellgens 18690
doellnfrootno 168
doellrootno 3332
ec_2divpol_evalx 29715
ec_3divpol_evalx 64856
ec_LHS_evalQ 129804
ec_bmodel 247915
ec_dFdx_evalQ 135178
ec_dFdy_evalQ 532
ec_dmFdy_evalQ 2085330
ec_f_evalx 1376700
ec_h_evalx 5993081
ec_half_deriv_2divpol 812
ec_half_deriv_2divpol_evalx 707
ec_phi2 105
ellQ_bsd 28
ellQ_charpoly 77
ellQ_factorback 4228
ellQ_factorback1 15732
ellQ_factorback_chinese 5332
ellQ_factorback_filter 10789
ellQ_factorback_slice 8741
ellQ_factorback_worker 8741
ellQ_genreduce 833
ellQ_get_CM 20585
ellQ_get_N 8092
ellQ_get_Nfa 952
ellQ_globalred 912184
ellQ_height 52410
ellQ_isdivisible 42
ellQ_isdivisible_test 42
ellQ_isisom 42
ellQ_minimalu 959539
ellQ_rootno 91
ellQ_saturation 49
ellQ_tamagawa 84
ellQap 98532
ellQap_u 407667
ellQminimalmodel 21637
ellQtwist_bsdperiod 19859
ellR_ab 83056
ellR_area 11998
ellR_on_neutral 83056
ellR_root 83056
ellR_roots 223301
ell_is_integral 52788
ell_over_Fq 254244
ell_reset 213402
ell_to_a4a6 4951229
ell_to_a4a6_bc 151083
ell_to_nfell10 181986
elladd 2567640
ellan 525
ellanQ 329
ellanQ_zv 6825
ellan_get_ap 1275422
ellanal_globalred 4641
ellap 4942625
ellapQ_zv 6825
ellapQ_zv_worker 20601
ellap_CM_fast 1330735
ellbasechar 9429
ellbsd 70
ellcard 187095
ellcard_ram 4780784
ellchangecompose 98
ellchangecompose_i 42
ellchangecurve 228788
ellchangeinvert 14
ellchangeinvert_i 49
ellchangepoint 132280
ellchangepoint0 146924
ellchangepointinv 973
ellchangepointinv0 1036
ellchangept 116152
ellchangeptinv 3402
ellchangetoalg 156933
ellchangevecpt 42
ellchangevecptinv 504
ellcharpoly 728
elldivpol 13307
elldivpol0 5075
elldivpol4 15246
elleulerf 70
ellexpo 7
ellff_Gm 185997
ellff_charpoly 658
ellff_get_D 18690
ellff_get_card 269905
ellff_get_gens 18767
ellff_get_group 167307
ellff_get_m 18690
ellff_get_o 19845
ellff_get_p 386399
ellffmul 1080
ellfromj 34020
ellfromj_simple 22715
ellgenerators 16849
ellglobalred 909685
ellglobalred_i 925421
ellgroup 127806
ellgroup0 21490
ellgroup_m 120715
ellheight 81243
ellheight0 57659
ellheight_C 28728
ellheightfaltings 70
ellheightmatrix 861
ellheightoo 30660
ellheightpairing 35
ellinit 1353807
ellinit_Fp 165734
ellinit_Fq 114525
ellinit_Q 1023568
ellinit_Qp 203
ellinit_Rg 67116
ellinit_i 1354955
ellinit_nf 73437
ellinit_nf_to_Fq 137732
ellintegralbmodel 0
ellintegralmodel 2520
ellintegralmodel_i 6117375
elliscm 196
ellisisom 49
ellisoncurve 44154
ellisoncurve_i 126027
ellissupersingular 166117
elljissupersingular 165907
elllocalred 197085
elllog 140
elllseries 14
ellminimalbmodel 966
ellminimaldisc 70
ellminimalmodel 21707
ellminimalmodel_i 963319
ellminimalprimes 58660
ellminimaltwist 700
ellminimaltwist0 448
ellminimaltwistcond 434
ellmul 251558
ellmul_CM 14
ellmul_CM_aux 14
ellmul_Z 251435
ellneg 82076
ellneg_i 77
ellnf2isog 287
ellnf_D_primes 1106
ellnf_adelicvolume 854
ellnf_bsd 42
ellnf_bsdperiod 854
ellnf_c4c6_primes 29771
ellnf_charpoly 49
ellnf_get_CM 98
ellnf_get_nf_prec 58660
ellnf_height 28833
ellnf_isisom 7
ellnf_localheight 85211
ellnf_minimalnormu 29722
ellnf_reladelicvolume 245
ellnf_rootno_global 168
ellnf_tamagawa 882
ellnf_to_Fq 137753
ellnf_vec_wrap 168
ellnf_vecarea 91
ellnf_veceta 28
ellnf_vecomega 49
ellnf_volume 56
ellnfan 203
ellnfap 191595
ellnfembed 29841
ellnfembed_free 1029
ellnfglobalred 980
ellnflocal 83773
ellnfminimalmodel 63
ellnfminimalmodel_i 63
ellordinate 183127
ellordinate_i 183127
ellpadicheight0 70
ellpadicheightmatrix 875
ellpointnfembed 28819
ellprint 0
ellrandom 246005
ellrnfup 364
ellrootno 210
ellrootno_2 1715
ellrootno_3 1428
ellrootno_global 4662
ellrootno_p 3479
ellsatp 1204
ellsatp_mat 1204
ellsaturation 49
ellsea 126
ellsub 56
ellsupersingularj 1204
elltamagawa 84
elltaniyama 14
elltatepairing 301
elltrace 70
elltwist 28735
elltwist_card 0
ellweilpairing 5250
ellxn 406
exphellagm 83056
fix_nftype 213367
gcomposev 15911
gellisoncurve_i 44294
get_j 1436596
get_piinv 157675
get_uniformizers 310394
get_vp_u 1711836
get_vp_u_small 3484835
handle_Q 40495
handle_coeff 30588212
hoo_aux 83056
init_ch 5090617
initsmall 1444562
initsmall46 261822
initsmall5 1399013
invcmp 236790
is_trivial_change 1357959
isptcoord 11376489
j_pval 1715315
kod_23 3143
localred 3073588
localred_23 1362228
localred_p 1711836
localred_result 3384458
localredbug 0
ltors_Fl 2807
min_get_v 1021405
min_set_2 35
min_set_3 140
min_set_D 1021419
min_set_a 1021440
min_set_all 1021405
min_set_b 1021580
min_set_c 1316155
min_set_u 1316155
min_to_ell 1008322
myroundr 42
nb_real_components 9723
neron_2 1715
neron_3 595
nfVtoalg 273637
nf_compose_r 479434
nf_compose_rt 594209
nf_compose_s 184658
nf_compose_st 496370
nf_compose_t 843276
nf_compose_u 443723
nf_coordch 483
nf_coordch_r 500026
nf_coordch_rst 483
nf_coordch_rt 301564
nf_coordch_s 184658
nf_coordch_st 19406
nf_coordch_t 407583
nf_coordch_uinv 444206
nfembed_extraprec 58660
nfembedall 206843
nflocalred 261233
nflocalred_23 181986
nflocalred_p 128408
nflocalred_section7 27524
nfrestrict23 42
nftoalg 2127531
numroots2 1537515
numroots3 473879
oncurve_exact 3855
padic_prec 238
point_to_a4a6 0
point_to_a4a6_Fl 64236
pol2sqrt_23 1627108
pola1a2 579782
pola2a4a6 592928
pola3a6 1070167
prV_merge_factors 28812
quad_root 83056
real_prec 84
rootnovalp 287
safe_Z_lval 31304
sievep 1279165
sievep_bad 12775
sievep_good 1266390
slope_samex 2047903
to_RgX 126
to_mod 1964080
triv_ser 0
twist2 406
val_aux 9429
val_init 3143
vecispt 5821196
zk_capZ 60648

Generated by: LCOV version 2.0-1