Unverified Commit a9f96508 authored by George Huebner's avatar George Huebner
Browse files

sympow: add sage self tests

parent 240ca368
Loading
Loading
Loading
Loading
+11 −4
Original line number Diff line number Diff line
@@ -59,8 +59,15 @@ stdenv.mkDerivation rec {

  # Example from the README as a sanity check.
  doInstallCheck = true;
  installCheckPhase = ''
  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'
    '';