30 lines
1 KiB
Bash
30 lines
1 KiB
Bash
#! /bin/sh
|
|
#
|
|
# Quick minimal test for lcalc.
|
|
#
|
|
# Test running the main binary (lcalc) and running the provided
|
|
# example program which is dynamically linked to the library.
|
|
# Also test that loading of L-function data files works.
|
|
#
|
|
# The precision is truncated at 13 (rather than the default 14),
|
|
# otherwise the output could vary a little bit depending on
|
|
# architecture and compiler flags. For the example program we
|
|
# patch-round using sed the two outputs that seem to vary.
|
|
#
|
|
echo "### First 1000 zeros of zeta function"
|
|
./lcalc -z 10 -P 13
|
|
echo
|
|
echo "### Analytic rank of elliptic curve 5077a1"
|
|
./lcalc -e --a1=0 --a2=0 --a3=1 --a4=-7 --a6=6 -r
|
|
echo
|
|
echo "### run example program"
|
|
# do some ad hoc rounding to avoid minor differences
|
|
LD_LIBRARY_PATH=. example_programs/example | sed -e '
|
|
s/\(L4(1,0) = ([0-9.]*\)[0-9],/\1,/;
|
|
s/6.123[0-9]*e-17/6.123e-17/'
|
|
echo
|
|
echo "### test data files: zeros of data_mass"
|
|
./lcalc -F example_data_files/data_maass -z 10 -P 13
|
|
echo
|
|
echo "### test data files: zeros of data_tau"
|
|
./lcalc -F example_data_files/data_tau -z 10 -P 13
|