pari: update to 2.15.0.
This commit is contained in:
parent
11c32f53fe
commit
bc2bd6e3e5
|
@ -4011,8 +4011,7 @@ libsimavrparts.so.1 simavr-1.6_2
|
|||
libsword-1.8.1.so libsword-1.8.1_6
|
||||
libgivaro.so.9 givaro-4.1.1_1
|
||||
liblinbox.so.0 linbox-1.6.3_1
|
||||
libpari-gmp.so.7 pari-2.13.0_1
|
||||
libpari-gmp-tls.so.7 pari-2.13.2_1
|
||||
libpari-gmp-tls.so.8 pari-2.15.0_1
|
||||
libtree-sitter.so.0 tree-sitter-0.19.0_1
|
||||
libplanarity.so.0 planarity-3.0.1.1_1
|
||||
libgap.so.0 gap-4.11.1_1
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
See: https://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=2419
|
||||
--
|
||||
|
||||
commit 9c4bcd3f497f30f757c8eecadc9b45b33754a540
|
||||
Author: Karim Belabas <Karim.Belabas@math.u-bordeaux.fr>
|
||||
Date: Tue Oct 4 10:30:43 2022 +0200
|
||||
|
||||
6- conversion to float of t_QUAD with t_FRAC components [#2419]
|
||||
|
||||
diff --git a/src/basemath/gen2.c b/src/basemath/gen2.c
|
||||
index 3ef74a7023..d810270b99 100644
|
||||
--- a/src/basemath/gen2.c
|
||||
+++ b/src/basemath/gen2.c
|
||||
@@ -2429,8 +2429,8 @@ quadtofp(GEN x, long prec)
|
||||
else
|
||||
{ /* if (b) x ~ (u + z) / 2 and quadnorm(x) ~ (u^2 - z^2) / 4
|
||||
* else x ~ u + z and quadnorm(x) ~ u^2 - z^2 */
|
||||
- long s = signe(u);
|
||||
- if (s == -signe(v)) /* conjugate expression avoids cancellation */
|
||||
+ long s = gsigne(u);
|
||||
+ if (s == -gsigne(v)) /* conjugate expression avoids cancellation */
|
||||
{
|
||||
z = gdiv(quadnorm(x), gsub(u, z));
|
||||
if (b) shiftr_inplace(z, 1);
|
||||
diff --git a/src/test/32/quad b/src/test/32/quad
|
||||
index 2b43d87a4a..1f1042d143 100644
|
||||
--- a/src/test/32/quad
|
||||
+++ b/src/test/32/quad
|
||||
@@ -43,6 +43,7 @@ w
|
||||
-4294967297
|
||||
4294967297
|
||||
-4294967297
|
||||
+2.2847006554165615148712535010323047844
|
||||
*** at top-level: floor(w8)
|
||||
*** ^---------
|
||||
*** floor: incorrect type in gfloor (t_QUAD).
|
||||
@@ -55,4 +56,4 @@ w
|
||||
*** at top-level: floor(Mod(0,3)*quadgen(5))
|
||||
*** ^--------------------------
|
||||
*** floor: incorrect type in gfloor (t_QUAD).
|
||||
-Total time spent: 2
|
||||
+Total time spent: 1
|
||||
diff --git a/src/test/in/quad b/src/test/in/quad
|
||||
index c8cd5a586f..82cd5e992d 100644
|
||||
--- a/src/test/in/quad
|
||||
+++ b/src/test/in/quad
|
||||
@@ -47,6 +47,7 @@ ceil(2*w)
|
||||
ceil(-2*w)
|
||||
round(2*w)
|
||||
round(-2*w)
|
||||
+quadgen(5) + 2/3 + 0.\\ #2419
|
||||
|
||||
\\ Errors keep at end of file
|
||||
floor(w8)
|
|
@ -0,0 +1,48 @@
|
|||
Author: Gonzalo Tornaría <tornaria@cmat.edu.uy>
|
||||
Date: Fri Oct 14 17:00:46 2022 -0300
|
||||
|
||||
Revert "x86 (32bit): force -mpc64 on compilers that supports it."
|
||||
|
||||
This reverts commit ca61b6391cf95ac8af15669236e2ec5839d2ad91.
|
||||
|
||||
|
||||
This causes problems with floating point precision on i686:
|
||||
```
|
||||
$ cat exp40.c
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
int main() {
|
||||
volatile int a=40; /* do not optimize away the call to exp(a) */
|
||||
printf("%f\n", exp(a));
|
||||
}
|
||||
$ cc -Wall exp40.c -lm && ./a.out
|
||||
235385266837020000.000000
|
||||
$ cc -Wall exp40.c -lm -mpc64 && ./a.out
|
||||
235385266837020448.000000
|
||||
```
|
||||
|
||||
Note that when pari is built using -mpc64, just *linking* with -lpari
|
||||
causes the problem!!!
|
||||
```
|
||||
$ cc -Wall exp40.c -lm -lpari && ./a.out
|
||||
235385266837020448.000000
|
||||
```
|
||||
|
||||
diff --git a/config/get_cc b/config/get_cc
|
||||
index 3cfaa88bb7..2d61d3871f 100644
|
||||
--- a/config/get_cc
|
||||
+++ b/config/get_cc
|
||||
@@ -110,13 +110,6 @@ if test -n "$__gnuc__"; then
|
||||
# Specific optimisations for some architectures
|
||||
case "$arch" in
|
||||
sparcv8*) cflags=-mv8;;
|
||||
- i?86)
|
||||
- cmd="$CC $CFLAGS $extraflag -mpc64 -fno-strict-aliasing -o $exe gnu.c"
|
||||
- . log_cmd
|
||||
- if test -s $exe; then
|
||||
- cflags="-mpc64"
|
||||
- fi
|
||||
- . cleanup_exe;;
|
||||
esac
|
||||
# problems on some architectures
|
||||
case "$osname" in
|
|
@ -1,6 +1,6 @@
|
|||
# Template file for 'pari'
|
||||
pkgname=pari
|
||||
version=2.13.4
|
||||
version=2.15.0
|
||||
revision=1
|
||||
build_style=configure
|
||||
build_helper=qemu
|
||||
|
@ -11,14 +11,15 @@ make_check_target=statest-all
|
|||
make_install_target="install install-lib-sta install-lib-dyn"
|
||||
hostmakedepends="perl texlive"
|
||||
makedepends="gmp-devel readline-devel $(vopt_if x11 libX11-devel)"
|
||||
checkdepends="pari-elldata-small pari-galdata pari-galpol-small pari-seadata-small"
|
||||
checkdepends="pari-elldata-small pari-galdata pari-galpol-small
|
||||
pari-seadata-small pari-nflistdata"
|
||||
short_desc="Fast computations library in number theory"
|
||||
maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
|
||||
license="GPL-2.0-or-later"
|
||||
homepage="https://pari.math.u-bordeaux.fr"
|
||||
changelog="https://pari.math.u-bordeaux.fr/cgi-bin/gitweb.cgi?p=pari.git;a=blob_plain;f=CHANGES;hb=refs/heads/pari-${version%.*}"
|
||||
distfiles="https://pari.math.u-bordeaux.fr/pub/pari/unix/${pkgname}-${version}.tar.gz"
|
||||
checksum=bcde9eceae1592814381c1697cdb7063567b6504201b1be47bb58920f3bce185
|
||||
checksum=e474851e0d16d4e4f9a0d9612c746a2ae7c9a1ec185d04c440b1c74a85755685
|
||||
|
||||
build_options="x11 pthreads"
|
||||
build_options_default="x11 pthreads"
|
||||
|
@ -27,6 +28,11 @@ desc_option_pthreads="Enable support for pthreads"
|
|||
# reduce speed losses due to pthreads
|
||||
CFLAGS="-flto -fno-semantic-interposition"
|
||||
|
||||
case $XBPS_TARGET_MACHINE in
|
||||
# avoid numerical noise caused by extended-precision of registers
|
||||
i686*) CFLAGS+=" -ffloat-store" ;;
|
||||
esac
|
||||
|
||||
post_patch() {
|
||||
# sse2 is not available on all i686
|
||||
# and it's available on all x86_64
|
||||
|
|
Loading…
Reference in New Issue