From a9f9650802d3136a6daea9818986fed9ab570daa Mon Sep 17 00:00:00 2001 From: George Huebner Date: Sun, 21 Jul 2024 14:47:15 -0500 Subject: [PATCH] sympow: add sage self tests --- .../libraries/science/math/sympow/default.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/science/math/sympow/default.nix b/pkgs/development/libraries/science/math/sympow/default.nix index 91daf30686f8..57506785a721 100644 --- a/pkgs/development/libraries/science/math/sympow/default.nix +++ b/pkgs/development/libraries/science/math/sympow/default.nix @@ -59,10 +59,17 @@ stdenv.mkDerivation rec { # Example from the README as a sanity check. doInstallCheck = true; - installCheckPhase = '' - export HOME=$TMPDIR - "$out/bin/sympow" -sp 2p16 -curve "[1,2,3,4,5]" | grep '8.3705' - ''; + installCheckPhase = + '' + export HOME=$TMPDIR + "$out/bin/sympow" -curve "[1,2,3,4,5]" -moddeg | grep 'Modular Degree is 464' + echo "[1,-1,0,-79,289]" | "$out/bin/sympow" -analrank | grep ^"Analytic Rank is 4" + "$out/bin/sympow" -curve "[1,-1,0,-79,289]" -analrank | grep ^"Analytic Rank is 4" + "$out/bin/sympow" -curve "[0,1,1,-2,0]" -analrank | grep ^"Analytic Rank is 2" + '' + + lib.optionalString (!stdenv.isAarch64) '' + "$out/bin/sympow" -sp 2p16 -curve "[1,2,3,4,5]" | grep '8.3705' + ''; meta = { description = "Compute special values of symmetric power elliptic curve L-functions";