From: tornaria <tornaria@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] Math package: lcalc-1.23
Date: Fri, 09 Apr 2021 04:43:26 +0200 [thread overview]
Message-ID: <20210409024326.Tw5Hc2Zdlth0QFok2Ei2CB_DQePVMizJ1lLgcdPilPI@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-30036@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 476 bytes --]
There is an updated pull request by tornaria against master on the void-packages repository
https://github.com/tornaria/void-packages math-lcalc
https://github.com/void-linux/void-packages/pull/30036
Math package: lcalc-1.23
Michael Rubinstein's L-function calculator.
The long files are just tests. The 3 versions are almost the same except for a few minor rounding differences.
A patch file from https://github.com/void-linux/void-packages/pull/30036.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-math-lcalc-30036.patch --]
[-- Type: text/x-diff, Size: 7052 bytes --]
From 0597a0a5639b0ae29410635c3224131ed0275578 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 1 Feb 2018 16:32:51 -0300
Subject: [PATCH] New package: lcalc-1.23
---
srcpkgs/lcalc-devel | 1 +
srcpkgs/lcalc/files/test | 30 ++++++++++
srcpkgs/lcalc/files/test.out | 112 +++++++++++++++++++++++++++++++++++
srcpkgs/lcalc/template | 70 ++++++++++++++++++++++
4 files changed, 213 insertions(+)
create mode 120000 srcpkgs/lcalc-devel
create mode 100644 srcpkgs/lcalc/files/test
create mode 100644 srcpkgs/lcalc/files/test.out
create mode 100644 srcpkgs/lcalc/template
diff --git a/srcpkgs/lcalc-devel b/srcpkgs/lcalc-devel
new file mode 120000
index 000000000000..ec3437a2fb19
--- /dev/null
+++ b/srcpkgs/lcalc-devel
@@ -0,0 +1 @@
+lcalc
\ No newline at end of file
diff --git a/srcpkgs/lcalc/files/test b/srcpkgs/lcalc/files/test
new file mode 100644
index 000000000000..de1f2a6b34e1
--- /dev/null
+++ b/srcpkgs/lcalc/files/test
@@ -0,0 +1,30 @@
+#! /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
diff --git a/srcpkgs/lcalc/files/test.out b/srcpkgs/lcalc/files/test.out
new file mode 100644
index 000000000000..b8e661e7e6c8
--- /dev/null
+++ b/srcpkgs/lcalc/files/test.out
@@ -0,0 +1,112 @@
+### First 1000 zeros of zeta function
+ 14.1347251417
+ 21.0220396388
+ 25.0108575801
+ 30.4248761259
+ 32.9350615877
+ 37.5861781588
+ 40.9187190121
+ 43.3270732809
+ 48.0051508812
+ 49.7738324777
+
+### Analytic rank of elliptic curve 5077a1
+analytic rank equals 3
+
+### run example program
+-----------------------------------------------
+
+Name of L_function: zeta
+All coefficients are equal to 1
+
+Q = 0.564189583548
+OMEGA = (1,0)
+a = 1 (the quasi degree)
+gamma[1] =0.5 lambda[1] =(0,0)
+
+
+number of poles (of the completed L function) = 2
+pole[1] =(1,0) residue[1] =(1,0)
+pole[2] =(0,0) residue[2] =(-1,0)
+-----------------------------------------------
+
+-----------------------------------------------
+
+Name of L_function: L4
+number of dirichlet coefficients = 4
+coefficients are periodic
+b[1] = 1
+b[2] = 0
+b[3] = -1
+b[4] = 0
+
+Q = 1.1283791671
+OMEGA = (1,0)
+a = 1 (the quasi degree)
+gamma[1] =0.5 lambda[1] =(0.5,0)
+
+
+number of poles (of the completed L function) = 0
+-----------------------------------------------
+
+-----------------------------------------------
+
+Name of L_function: L5
+number of dirichlet coefficients = 5
+coefficients are periodic
+b[1] = (1,0)
+b[2] = (0,1)
+b[3] = (-0,-1)
+b[4] = (-1,0)
+b[5] = (0,0)
+
+Q = 1.26156626101
+OMEGA = (0.850650808352,0.525731112119)
+a = 1 (the quasi degree)
+gamma[1] =0.5 lambda[1] =(0.5,0)
+
+
+number of poles (of the completed L function) = 0
+-----------------------------------------------
+
+zeta(0.5,0) = (-1.46035450881,0)
+L4(0.5,0) = (0.6676914571896,0)
+L5(0.5,0) = (0.7637478801173,0.2169647675189)
+L4(1,0) = (0.785398163397,0)
+L5(1,0) = (0.8648062659772,0.2041530661384)
+0.4285714285714
+1.5
+0.1666666666667
+0.6666666666667
+0.5714285714286
+0
+0.5714285714286
+0.5714285714286
+0
+0.8888888888889
+6.123e-17
+-0.7071067811865
+
+### test data files: zeros of data_mass
+ 2.8977246783
+ 5.5912453153
+ 21.0903775087
+ 23.1575104846
+ 25.4393003898
+ 29.1892067135
+ 31.0617394845
+ 32.4527182375
+ 34.027279684
+ 36.9312371969
+
+### test data files: zeros of data_tau
+ 9.22237939992
+ 13.9075498614
+ 17.4427769782
+ 19.656513142
+ 22.3361036372
+ 25.2746365481
+ 26.8043911584
+ 28.8316826242
+ 31.1782094984
+ 32.7748753822
diff --git a/srcpkgs/lcalc/template b/srcpkgs/lcalc/template
new file mode 100644
index 000000000000..ee1f82b963bd
--- /dev/null
+++ b/srcpkgs/lcalc/template
@@ -0,0 +1,70 @@
+# Template file for 'lcalc'
+pkgname=lcalc
+version=1.23
+revision=1
+build_wrksrc="src"
+build_style="gnu-makefile"
+makedepends="gmp-devel pari-devel"
+short_desc="Michael Rubinstein's L-function calculator"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="https://mirrors.mit.edu/sage/spkg/upstream/lcalc/"
+distfiles="https://mirrors.mit.edu/sage/spkg/upstream/lcalc/lcalc-${version}.tar.bz2"
+checksum="83d4253ec2f38553b21190d6d0c6b71bab7ea14717f6dde5bd18f60775d3cdb0
+ bd39a43b24a332e1826e667f85ca2ce2ca14749d56f60069cd886c96f55e9e3c
+ d8c660f68f33b6eeb4b801d4028faaaaccbfff5797efe654bb6367e0a687542d
+ dadf6fc6d481595cb041f8b0dd92bc2e2bc390cbb3e0dd36b7fe63b74942db26
+ 342cde1c9effda48597bfee439acb37c91458a100580c97c84da6a142d2cc5b6
+ 55c6c9f969593f24c75a85e7a150b876671356aa68ceb8e77c563a645897643e
+ 906ef33de15bb0d94883b7797d8cb3c889b9f59bceebeb171e65f1546faf1c37
+ 437e3870342ef4cb5749398ead9381504403e7e1f99efadab95f4a607678b400
+ 6471f2f30497486e289fc8977cbb89c495cf0d5ff58af2b1f479a497a28165e6
+ dde1f80b0ca42fb43917c24e6016c19e4a8d28de9c50cd0a523a318866bdc0eb
+ 941d4ac025f5d6f0142fb785b27f7a221729466dc83d45fd206cce102c012eaf
+ 045f23ea9131b8039001c8f13d22152f7b3c2e91adcf8c555354eaf39e7a7b48"
+
+# get patches from sagemath
+_patchurl="https://git.sagemath.org/sage.git/plain/build/pkgs/lcalc/patches"
+_patchtag="?h=9.3.rc2"
+_patches="
+ Lcommon.h.patch
+ Lvalue.h.patch
+ Makefile.patch
+ clang.patch
+ lcalc-1.23_default_parameters_1.patch
+ lcalc-1.23_default_parameters_2.patch
+ pari-2.7.patch
+ pari-mem.patch
+ pari_include.patch
+ time.h.patch
+ using_namespace_std.patch"
+for patch in $_patches ; do
+ distfiles+=" ${_patchurl}/${patch}${_patchtag}>${patch}"
+done
+skip_extraction="$_patches"
+
+post_extract() {
+ for patch in $_patches ; do
+ patch -p1 < "$XBPS_SRCDISTDIR/${pkgname}-${version}/${patch}"
+ done
+}
+
+CXXFLAGS="-fPIC -Wno-deprecated"
+
+pre_install() {
+ mkdir -p ${DESTDIR}/usr/{bin,lib,include}
+ make_install_args+=" INSTALL_DIR=${DESTDIR}/usr"
+}
+
+do_check() {
+ echo "Testing lcalc ..."
+ sh "${FILESDIR}"/test > test.log
+ diff "${FILESDIR}"/test.out test.log && echo PASS
+}
+
+lcalc-devel_package() {
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove "usr/include"
+ }
+}
next prev parent reply other threads:[~2021-04-09 2:43 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-06 5:10 [PR PATCH] " tornaria
2021-04-06 5:21 ` [PR PATCH] [Updated] " tornaria
2021-04-07 12:56 ` dkwo
2021-04-07 17:54 ` [PR REVIEW] " Chocimier
2021-04-07 17:54 ` Chocimier
2021-04-07 17:56 ` ericonr
2021-04-07 18:01 ` ericonr
2021-04-07 20:11 ` tornaria
2021-04-07 20:16 ` tornaria
2021-04-07 20:33 ` ericonr
2021-04-07 20:49 ` tornaria
2021-04-07 21:26 ` ericonr
2021-04-07 22:10 ` [PR PATCH] [Updated] " tornaria
2021-04-07 22:16 ` tornaria
2021-04-07 22:24 ` tornaria
2021-04-08 0:46 ` [PR REVIEW] " ericonr
2021-04-08 0:46 ` ericonr
2021-04-08 0:46 ` ericonr
2021-04-08 0:46 ` ericonr
2021-04-08 0:47 ` ericonr
2021-04-08 1:06 ` [PR REVIEW] " tornaria
2021-04-08 1:06 ` tornaria
2021-04-08 1:08 ` [PR PATCH] [Updated] " tornaria
2021-04-08 1:16 ` [PR REVIEW] " tornaria
2021-04-08 1:20 ` [PR PATCH] [Updated] " tornaria
2021-04-08 1:49 ` tornaria
2021-04-08 2:03 ` ericonr
2021-04-08 3:08 ` [PR PATCH] [Updated] " tornaria
2021-04-08 3:13 ` tornaria
2021-04-09 2:26 ` [PR REVIEW] " ericonr
2021-04-09 2:41 ` [PR PATCH] [Updated] " tornaria
2021-04-09 2:43 ` tornaria [this message]
2021-04-09 2:45 ` [PR REVIEW] " tornaria
2021-04-09 2:46 ` tornaria
2021-04-09 17:22 ` Chocimier
2021-08-18 22:37 ` [PR PATCH] [Updated] " tornaria
2021-08-19 1:42 ` tornaria
2021-10-31 9:01 ` dkwo
2021-11-03 20:50 ` [PR PATCH] [Merged]: " Chocimier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210409024326.Tw5Hc2Zdlth0QFok2Ei2CB_DQePVMizJ1lLgcdPilPI@z \
--to=tornaria@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).