void-packages/srcpkgs/sympow/files/test

52 lines
1.3 KiB
Bash

#! /bin/sh
# Quick minimal test for sympow
#
# Compute modular degree and analytic rank for some curves so we check
# that it works and also that fpu arithmetic and output are ok
# setup sympow to run from cwd
export SYMPOW_PKGDATADIR=.
export SYMPOW_PKGLIBDIR=.
mkdir -p sympow_cache
export SYMPOW_CACHEDIR=sympow_cache
E11a=[0,-1,1,-10,-20]
E37a=[0,0,1,-1,0]
E389a=[0,1,1,-2,0]
E5077a=[0,0,1,-7,6]
E4=[1,-1,0,-79,289]
E5=[0,0,1,-79,342]
E6=[1,1,0,-2582,48720]
E7=[0,0,0,-10012,346900]
echo "### Compute modular degree for some curves"
echo "# 11a"
./sympow -quiet -curve $E11a -moddeg
echo "# 37a"
./sympow -quiet -curve $E37a -moddeg
echo "# 389a"
./sympow -quiet -curve $E389a -moddeg
echo "# 5077a"
./sympow -quiet -curve $E5077a -moddeg
echo "# 234446a"
./sympow -quiet -curve $E4 -moddeg
echo "### Compute analytic rank for some curves"
echo "# 11a"
./sympow -quiet -curve $E11a -analrank
echo "# 37a"
./sympow -quiet -curve $E37a -analrank
echo "# 389a"
./sympow -quiet -curve $E389a -analrank
echo "# 5077a"
./sympow -quiet -curve $E5077a -analrank
echo "# 234446a"
./sympow -quiet -curve $E4 -analrank
echo "# curve of rank 5"
./sympow -quiet -curve $E5 -analrank
echo "# curve of rank 6"
./sympow -quiet -curve $E6 -analrank
echo "# curve of rank 7"
./sympow -quiet -curve $E7 -analrank