SHA256
3
0
forked from pool/mpc

- Update to version 1.1.0.

- Compatible with mpfr 4.0.0, obsoletes mpc-1.0.3-addsubulp.diff
    and mpc-1.0.3-fmma.diff.
  - New functions mpc_cmp_abs and mpc_rootofunity
  - Rewrite of the testing framework
  - New mpcbench tool, used with make bench
  - Fixed handling of over- and underflows with directed rounding in
    the "other direction" for mpc_cos, mpc_sin, mpc_exp and mpc_pow
  - Fixed a bug in mpc_atan(0,y) with |y| near 1

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/mpc?expand=0&rev=37
This commit is contained in:
Richard Biener 2018-01-16 10:43:29 +00:00 committed by Git OBS Bridge
parent 08f2af33a1
commit 0e424088e4
8 changed files with 24 additions and 116 deletions

View File

@ -1,25 +0,0 @@
From: Paul Zimmermann <Paul.Zimmermann@inria.fr>
Date: Wed, 4 Oct 2017 20:09:40 +0000 (+0200)
Subject: replace obsolete mpfr_add_one_ulp/mpfr_sub_one_ulp functions
X-Git-Url: https://scm.gforge.inria.fr/anonscm/gitweb?p=mpc%2Fmpc.git;a=commitdiff_plain;h=5eaa17651b759c7856a118835802fecbebcf46ad
replace obsolete mpfr_add_one_ulp/mpfr_sub_one_ulp functions
---
Index: mpc-1.0.3/src/mpc-impl.h
===================================================================
--- mpc-1.0.3.orig/src/mpc-impl.h 2018-01-02 14:04:02.075989843 +0100
+++ mpc-1.0.3/src/mpc-impl.h 2018-01-02 14:05:02.712974966 +0100
@@ -60,8 +60,10 @@ along with this program. If not, see htt
mpfr_setsign (x, y, 0, rnd) : \
mpfr_copysign (x, y, z, rnd))
/* work around spurious signs in nan */
-#define MPFR_ADD_ONE_ULP(x) mpfr_add_one_ulp (x, GMP_RNDN)
-#define MPFR_SUB_ONE_ULP(x) mpfr_sub_one_ulp (x, GMP_RNDN)
+#define MPFR_ADD_ONE_ULP(x) \
+ (mpfr_sgn (x) > 0 ? mpfr_nextabove (x) : mpfr_nextbelow (x))
+#define MPFR_SUB_ONE_ULP(x) \
+ (mpfr_sgn (x) > 0 ? mpfr_nextbelow (x) : mpfr_nextabove (x))
/* drop unused rounding mode from macroes */
#define MPFR_SWAP(a,b) do { mpfr_srcptr tmp; tmp = a; a = b; b = tmp; } while (0)

View File

@ -1,76 +0,0 @@
From 36a84f43f326de14db888ba07936cc9621c23f19 Mon Sep 17 00:00:00 2001
From: Paul Zimmermann <Paul.Zimmermann@inria.fr>
Date: Sun, 10 Jan 2016 23:19:37 +0100
Subject: [PATCH] use mpfr_fmma and mpfr_fmms if provided by mpfr
---
configure.ac | 16 ++++++++++++++++
src/mul.c | 15 ++++++++++++---
2 files changed, 28 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index b6fa199..bdb21ff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -165,6 +165,22 @@ AC_LINK_IFELSE(
AC_MSG_ERROR([libmpfr not found or uses a different ABI (including static vs shared).])
])
+AC_MSG_CHECKING(for mpfr_fmma)
+LIBS="-lmpfr $LIBS"
+AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include "mpfr.h"]],
+ [[mpfr_t x; mpfr_fmma (x, x, x, x, x, 0);]]
+ )],
+ [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_MPFR_FMMA, 1, [mpfr_fmma is present])
+ ],
+ [
+ AC_MSG_RESULT(no)
+ AC_DEFINE(HAVE_MPFR_FMMA, 0, [mpfr_fmma is not present])
+ ])
+
# Check for a recent GMP
# We only guarantee that with a *functional* and recent enough GMP version,
# MPC will compile; we do not guarantee that GMP will compile.
--- mpc-1.0.3/src/mul.c.orig 2015-02-16 13:37:30.000000000 +0100
+++ mpc-1.0.3/src/mul.c 2018-01-02 13:54:34.030414144 +0100
@@ -171,8 +171,9 @@
}
+#if HAVE_MPFR_FMMA == 0
static int
-mpfr_fmma (mpfr_ptr z, mpfr_srcptr a, mpfr_srcptr b, mpfr_srcptr c,
+mpc_fmma (mpfr_ptr z, mpfr_srcptr a, mpfr_srcptr b, mpfr_srcptr c,
mpfr_srcptr d, int sign, mpfr_rnd_t rnd)
{
/* Computes z = ab+cd if sign >= 0, or z = ab-cd if sign < 0.
@@ -319,6 +320,7 @@
return inex;
}
+#endif
int
@@ -337,10 +339,17 @@
else
rop [0] = z [0];
+#if HAVE_MPFR_FMMA
inex = MPC_INEX (mpfr_fmma (mpc_realref (rop), mpc_realref (x), mpc_realref (y), mpc_imagref (x),
mpc_imagref (y), -1, MPC_RND_RE (rnd)),
mpfr_fmma (mpc_imagref (rop), mpc_realref (x), mpc_imagref (y), mpc_imagref (x),
mpc_realref (y), +1, MPC_RND_IM (rnd)));
+#else
+ inex = MPC_INEX (mpc_fmma (mpc_realref (rop), mpc_realref (x), mpc_realref (y), mpc_imagref (x),
+ mpc_imagref (y), -1, MPC_RND_RE (rnd)),
+ mpc_fmma (mpc_imagref (rop), mpc_realref (x), mpc_imagref (y), mpc_imagref (x),
+ mpc_realref (y), +1, MPC_RND_IM (rnd)));
+#endif
mpc_set (z, rop, MPC_RNDNN);
if (overlap)

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:617decc6ea09889fb08ede330917a00b16809b8db88c29c31bfbb49cbf88ecc3
size 669925

View File

@ -1,7 +0,0 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iF4EABEIAAYFAlTiF+IACgkQ99XJv3ZcYeMtowD9E7rB9mf5bGQ4pZiYIagHf4i7
6YpMpaHvjHLXtRnUtS4A/0Aj9RWJIm/EnjG1SZU3E8oZ81jVOZxywnCpGP/XjzkR
=jbuL
-----END PGP SIGNATURE-----

3
mpc-1.1.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e
size 701263

7
mpc-1.1.0.tar.gz.sig Normal file
View File

@ -0,0 +1,7 @@
-----BEGIN PGP SIGNATURE-----
iHUEABEIAB0WIQStF6Ie+K7Y8cwC29n31cm/dlxh4wUCWldkngAKCRD31cm/dlxh
46gmAP9anSuOel4JeajoYf/b2pSLS//llfrwE1tQXRaL+xt3AwEAiNO/CV2tqMiW
wVFvL35TH7XpH3z+XPLa7vUdPuWAMi0=
=jOaM
-----END PGP SIGNATURE-----

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Tue Jan 16 10:11:17 UTC 2018 - rguenther@suse.com
- Update to version 1.1.0.
- Compatible with mpfr 4.0.0, obsoletes mpc-1.0.3-addsubulp.diff
and mpc-1.0.3-fmma.diff.
- New functions mpc_cmp_abs and mpc_rootofunity
- Rewrite of the testing framework
- New mpcbench tool, used with make bench
- Fixed handling of over- and underflows with directed rounding in
the "other direction" for mpc_cos, mpc_sin, mpc_exp and mpc_pow
- Fixed a bug in mpc_atan(0,y) with |y| near 1
-------------------------------------------------------------------
Tue Jan 2 13:06:25 UTC 2018 - rguenther@suse.com

View File

@ -17,7 +17,7 @@
Name: mpc
Version: 1.0.3
Version: 1.1.0
Release: 0
Summary: MPC multiple-precision complex shared library
License: LGPL-3.0+
@ -27,8 +27,6 @@ Source0: http://www.multiprecision.org/mpc/download/mpc-%{version}.tar.gz
Source1: http://www.multiprecision.org/mpc/download/mpc-%{version}.tar.gz.sig
Source2: %{name}.keyring
Source3: baselibs.conf
Patch1: mpc-1.0.3-fmma.diff
Patch2: mpc-1.0.3-addsubulp.diff
BuildRequires: gmp-devel
BuildRequires: mpfr-devel
Requires(post): %{install_info_prereq}
@ -62,8 +60,6 @@ MPC multiple-precision complex library development files.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%build
%configure