From 9993af5a360d41d95129daedc26b9687cf182dc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20R=C3=BCth?= Date: Wed, 11 Sep 2019 13:21:44 +0200 Subject: [PATCH 1/2] Fix clash of __hypot see #278, __ are reserved according to the C99 standard. --- acb_dirichlet/stieltjes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/acb_dirichlet/stieltjes.c b/acb_dirichlet/stieltjes.c index 4ca96909..e268cd70 100644 --- a/acb_dirichlet/stieltjes.c +++ b/acb_dirichlet/stieltjes.c @@ -340,16 +340,16 @@ stieltjes_mag(double n) return t; } -static double __hypot(double x, double y) { return sqrt(x * x + y * y); } +static double arb_hypot(double x, double y) { return sqrt(x * x + y * y); } /* log2 magnitude of integrand at z = x+yi; alpha = a+bi */ static double integrand_mag(double n, double x, double y, double a, double b) { double t, u; - t = log(__hypot(a - y, b + x)); + t = log(arb_hypot(a - y, b + x)); u = atan2(b + x, a - y); - t = log(__hypot(t,u)) * (n+1) - 2.0 * 3.1415926535897932 * x; + t = log(arb_hypot(t,u)) * (n+1) - 2.0 * 3.1415926535897932 * x; return t * 1.44269504088896341; } From 81eaf0203b98f2d59e70fdd7eaef615bbb5fae3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20R=C3=BCth?= Date: Wed, 11 Sep 2019 14:10:44 +0200 Subject: [PATCH 2/2] Rename arb_hypot to an unused name --- acb_dirichlet/stieltjes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/acb_dirichlet/stieltjes.c b/acb_dirichlet/stieltjes.c index e268cd70..ddd5bcbd 100644 --- a/acb_dirichlet/stieltjes.c +++ b/acb_dirichlet/stieltjes.c @@ -340,16 +340,16 @@ stieltjes_mag(double n) return t; } -static double arb_hypot(double x, double y) { return sqrt(x * x + y * y); } +static double _d_approx_hypot(double x, double y) { return sqrt(x * x + y * y); } /* log2 magnitude of integrand at z = x+yi; alpha = a+bi */ static double integrand_mag(double n, double x, double y, double a, double b) { double t, u; - t = log(arb_hypot(a - y, b + x)); + t = log(_d_approx_hypot(a - y, b + x)); u = atan2(b + x, a - y); - t = log(arb_hypot(t,u)) * (n+1) - 2.0 * 3.1415926535897932 * x; + t = log(_d_approx_hypot(t,u)) * (n+1) - 2.0 * 3.1415926535897932 * x; return t * 1.44269504088896341; }