Skip to content

Commit

Permalink
sympow: "fix" on aarch64
Browse files Browse the repository at this point in the history
I'm out of my depth here, but it appears sympow is not useful on
systems like aarch64-darwin, as it only works up to a certain
precision due to FPU differences.

See https://github.com/sagemath/sage/blob/272582be9e0ddbf253a5dfbcd772f53c51fcf700/build/pkgs/sympow/email-exchange.txt
for more information
  • Loading branch information
Feyorsh committed Mar 22, 2024
1 parent 4d79595 commit 14c1525
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pkgs/development/libraries/science/math/sympow/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,17 @@ stdenv.mkDerivation rec {
'';

# Example from the README as a sanity check.
# sympow barely works on aarch64-darwin due to floating point black magic,
# but we ought to test at least the bare minimum.
doInstallCheck = true;
installCheckPhase = ''
export HOME="$TMP/home"
mkdir -p "$HOME"
'' + (if (stdenv.isAarch64) then ''
"$out/bin/sympow" -curve "[1,2,3,4,5]" -moddeg | grep 'Modular Degree is 464'
'' else ''
"$out/bin/sympow" -sp 2p16 -curve "[1,2,3,4,5]" | grep '8.3705'
'';
'');

meta = with lib; {
description = "Compute special values of symmetric power elliptic curve L-functions";
Expand All @@ -80,6 +85,6 @@ stdenv.mkDerivation rec {
free = true;
};
maintainers = teams.sage.members;
platforms = platforms.linux;
platforms = platforms.unix;
};
}

0 comments on commit 14c1525

Please sign in to comment.