This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch experimental
in repository proj.

commit dd8b863d069a39a444117b57f2bdc6677d53a5a7
Author: Bas Couwenberg <sebas...@xs4all.nl>
Date:   Thu Feb 8 15:58:38 2018 +0100

    Add patch to avoid numerical differences on non-amd64 architectures.
---
 debian/changelog                                   |   6 +
 ...al-differences-on-non-amd64-architectures.patch | 212 +++++++++++++++++++++
 debian/patches/series                              |   1 +
 3 files changed, 219 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index c76cfc2..1156324 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+proj (5.0.0~rc2-1~exp2) UNRELEASED; urgency=medium
+
+  * Add patch to avoid numerical differences on non-amd64 architectures.
+
+ -- Bas Couwenberg <sebas...@debian.org>  Thu, 08 Feb 2018 15:58:33 +0100
+
 proj (5.0.0~rc2-1~exp1) experimental; urgency=medium
 
   * New upstream release candidate.
diff --git 
a/debian/patches/avoid-numerical-differences-on-non-amd64-architectures.patch 
b/debian/patches/avoid-numerical-differences-on-non-amd64-architectures.patch
new file mode 100644
index 0000000..3fce667
--- /dev/null
+++ 
b/debian/patches/avoid-numerical-differences-on-non-amd64-architectures.patch
@@ -0,0 +1,212 @@
+From 8ac00a13f4b78ee5c888617e29158fc774f54dc3 Mon Sep 17 00:00:00 2001
+From: Kristian Evers <kristianev...@gmail.com>
+Date: Thu, 8 Feb 2018 14:26:29 +0100
+Subject: [PATCH] Trying to fix #778 by using doubles in robin and relaxing
+ tolerances in a few tests
+
+---
+ nad/testvarious       |  4 +--
+ nad/tv_out.dist       | 20 ++++++-------
+ src/PJ_robin.c        | 80 +++++++++++++++++++++++++--------------------------
+ test/gie/builtins.gie | 20 +++++++------
+ 4 files changed, 63 insertions(+), 61 deletions(-)
+
+--- a/nad/testvarious
++++ b/nad/testvarious
+@@ -782,11 +782,11 @@ EOF
+ echo  "##############################################################" >> 
${OUT}
+ echo  "Test SCH inverse projection" >> ${OUT}
+ #
+-$EXE -f '%.7f' \
++$EXE -f '%.6f' \
+     +proj=sch +datum=WGS84 +plat_0=30.0 +plon_0=45.0 +phdg_0=-12.0 +nodefs 
+to \
+     +proj=latlong +datum=WGS84 \
+  -E >> ${OUT} <<EOF
+-0. 0.
++0. 0. 2.
+ 0. 1000.
+ 1000. 0.
+ 1000. 1000.
+--- a/nad/tv_out.dist
++++ b/nad/tv_out.dist
+@@ -85,12 +85,12 @@ Test transverse mercator inverse (#97)
+ 15d4'42.357"E 14d48'56.372"N 0.000    3999967.33      1999855.31 0.00
+ ##############################################################
+ Test robinson projection (#113)
+--30 40        -2612095.95     4276351.58 0.00
+--35 45        -2963455.42     4805073.65 0.00
+-20 40 1741397.30      4276351.58 0.00
+--2612095.95     4276351.58 0.00       30d0'0.004"W    40d0'0.066"N 0.000
+--2963455.42     4805073.65 0.00       35dW    45dN 0.000
+-1741397.30      4276351.58 0.00       20d0'0.002"E    40d0'0.066"N 0.000
++-30 40        -2612096.00     4276351.68 0.00
++-35 45        -2963455.41     4805073.66 0.00
++20 40 1741397.33      4276351.68 0.00
++-2612095.95     4276351.58 0.00       30d0'0.006"W    40d0'0.063"N 0.000
++-2963455.42     4805073.65 0.00       34d59'59.989"W  44d59'59.946"N 0.000
++1741397.30      4276351.58 0.00       20d0'0.004"E    40d0'0.063"N 0.000
+ ##############################################################
+ Test hammer projection (pull request #329)
+ -30 40        -2711575.08     4395506.62 0.00
+@@ -389,10 +389,10 @@ Test SCH forward projection
+ 30.0 45.0     1974596.2356203 787409.8217445 773.0028577
+ ##############################################################
+ Test SCH inverse projection
+-0. 0. 45.0000000      30.0000000 0.0000000
+-0. 1000.      44.9898625      29.9981240 -0.0003617
+-1000. 0.      44.9978450      30.0088238 -0.0000000
+-1000. 1000.   44.9877066      30.0069477 -0.0005228
++0. 0. 2.      45.000000       30.000000 2.000000
++0. 1000.      44.989863       29.998124 -0.000362
++1000. 0.      44.997845       30.008824 -0.000000
++1000. 1000.   44.987707       30.006948 -0.000523
+ ##############################################################
+ Test issue #316 (switch utm to use etmerc)
+ 0 83  145723.870553   9300924.845226 0.000000
+--- a/src/PJ_robin.c
++++ b/src/PJ_robin.c
+@@ -17,51 +17,51 @@ http://trac.osgeo.org/proj/ticket/113
+ */
+ 
+ struct COEFS {
+-    float c0, c1, c2, c3;
++    double c0, c1, c2, c3;
+ };
+ 
+ static const struct COEFS X[] = {
+-    {1.0f, 2.2199e-17f, -7.15515e-05f, 3.1103e-06f},
+-    {0.9986f, -0.000482243f, -2.4897e-05f, -1.3309e-06f},
+-    {0.9954f, -0.00083103f, -4.48605e-05f, -9.86701e-07f},
+-    {0.99f, -0.00135364f, -5.9661e-05f, 3.6777e-06f},
+-    {0.9822f, -0.00167442f, -4.49547e-06f, -5.72411e-06f},
+-    {0.973f, -0.00214868f, -9.03571e-05f, 1.8736e-08f},
+-    {0.96f, -0.00305085f, -9.00761e-05f, 1.64917e-06f},
+-    {0.9427f, -0.00382792f, -6.53386e-05f, -2.6154e-06f},
+-    {0.9216f, -0.00467746f, -0.00010457f, 4.81243e-06f},
+-    {0.8962f, -0.00536223f, -3.23831e-05f, -5.43432e-06f},
+-    {0.8679f, -0.00609363f, -0.000113898f, 3.32484e-06f},
+-    {0.835f, -0.00698325f, -6.40253e-05f, 9.34959e-07f},
+-    {0.7986f, -0.00755338f, -5.00009e-05f, 9.35324e-07f},
+-    {0.7597f, -0.00798324f, -3.5971e-05f, -2.27626e-06f},
+-    {0.7186f, -0.00851367f, -7.01149e-05f, -8.6303e-06f},
+-    {0.6732f, -0.00986209f, -0.000199569f, 1.91974e-05f},
+-    {0.6213f, -0.010418f, 8.83923e-05f, 6.24051e-06f},
+-    {0.5722f, -0.00906601f, 0.000182f, 6.24051e-06f},
+-    {0.5322f, -0.00677797f, 0.000275608f, 6.24051e-06f}
++    {1.0, 2.2199e-17, -7.15515e-05, 3.1103e-06},
++    {0.9986, -0.000482243, -2.4897e-05, -1.3309e-06},
++    {0.9954, -0.00083103, -4.48605e-05, -9.86701e-07},
++    {0.99, -0.00135364, -5.9661e-05, 3.6777e-06},
++    {0.9822, -0.00167442, -4.49547e-06, -5.72411e-06},
++    {0.973, -0.00214868, -9.03571e-05, 1.8736e-08},
++    {0.96, -0.00305085, -9.00761e-05, 1.64917e-06},
++    {0.9427, -0.00382792, -6.53386e-05, -2.6154e-06},
++    {0.9216, -0.00467746, -0.00010457, 4.81243e-06},
++    {0.8962, -0.00536223, -3.23831e-05, -5.43432e-06},
++    {0.8679, -0.00609363, -0.000113898, 3.32484e-06},
++    {0.835, -0.00698325, -6.40253e-05, 9.34959e-07},
++    {0.7986, -0.00755338, -5.00009e-05, 9.35324e-07},
++    {0.7597, -0.00798324, -3.5971e-05, -2.27626e-06},
++    {0.7186, -0.00851367, -7.01149e-05, -8.6303e-06},
++    {0.6732, -0.00986209, -0.000199569, 1.91974e-05},
++    {0.6213, -0.010418, 8.83923e-05, 6.24051e-06},
++    {0.5722, -0.00906601, 0.000182, 6.24051e-06},
++    {0.5322, -0.00677797, 0.000275608, 6.24051e-06}
+ };
+ 
+ static const struct COEFS Y[] = {
+-    {-5.20417e-18f, 0.0124f, 1.21431e-18f, -8.45284e-11f},
+-    {0.062f, 0.0124f, -1.26793e-09f, 4.22642e-10f},
+-    {0.124f, 0.0124f, 5.07171e-09f, -1.60604e-09f},
+-    {0.186f, 0.0123999f, -1.90189e-08f, 6.00152e-09f},
+-    {0.248f, 0.0124002f, 7.10039e-08f, -2.24e-08f},
+-    {0.31f, 0.0123992f, -2.64997e-07f, 8.35986e-08f},
+-    {0.372f, 0.0124029f, 9.88983e-07f, -3.11994e-07f},
+-    {0.434f, 0.0123893f, -3.69093e-06f, -4.35621e-07f},
+-    {0.4958f, 0.0123198f, -1.02252e-05f, -3.45523e-07f},
+-    {0.5571f, 0.0121916f, -1.54081e-05f, -5.82288e-07f},
+-    {0.6176f, 0.0119938f, -2.41424e-05f, -5.25327e-07f},
+-    {0.6769f, 0.011713f, -3.20223e-05f, -5.16405e-07f},
+-    {0.7346f, 0.0113541f, -3.97684e-05f, -6.09052e-07f},
+-    {0.7903f, 0.0109107f, -4.89042e-05f, -1.04739e-06f},
+-    {0.8435f, 0.0103431f, -6.4615e-05f, -1.40374e-09f},
+-    {0.8936f, 0.00969686f, -6.4636e-05f, -8.547e-06f},
+-    {0.9394f, 0.00840947f, -0.000192841f, -4.2106e-06f},
+-    {0.9761f, 0.00616527f, -0.000256f, -4.2106e-06f},
+-    {1.0f, 0.00328947f, -0.000319159f, -4.2106e-06f}
++    {-5.20417e-18, 0.0124, 1.21431e-18, -8.45284e-11},
++    {0.062, 0.0124, -1.26793e-09, 4.22642e-10},
++    {0.124, 0.0124, 5.07171e-09, -1.60604e-09},
++    {0.186, 0.0123999, -1.90189e-08, 6.00152e-09},
++    {0.248, 0.0124002, 7.10039e-08, -2.24e-08},
++    {0.31, 0.0123992, -2.64997e-07, 8.35986e-08},
++    {0.372, 0.0124029, 9.88983e-07, -3.11994e-07},
++    {0.434, 0.0123893, -3.69093e-06, -4.35621e-07},
++    {0.4958, 0.0123198, -1.02252e-05, -3.45523e-07},
++    {0.5571, 0.0121916, -1.54081e-05, -5.82288e-07},
++    {0.6176, 0.0119938, -2.41424e-05, -5.25327e-07},
++    {0.6769, 0.011713, -3.20223e-05, -5.16405e-07},
++    {0.7346, 0.0113541, -3.97684e-05, -6.09052e-07},
++    {0.7903, 0.0109107, -4.89042e-05, -1.04739e-06},
++    {0.8435, 0.0103431, -6.4615e-05, -1.40374e-09},
++    {0.8936, 0.00969686, -6.4636e-05, -8.547e-06},
++    {0.9394, 0.00840947, -0.000192841, -4.2106e-06},
++    {0.9761, 0.00616527, -0.000256, -4.2106e-06},
++    {1.0, 0.00328947, -0.000319159, -4.2106e-06}
+ };
+ 
+ #define FXC 0.8487
+@@ -129,7 +129,7 @@ static LP s_inverse (XY xy, PJ *P) {
+         /* first guess, linear interp */
+         t = 5. * (lp.phi - T.c0)/(Y[i+1].c0 - T.c0);
+         /* make into root */
+-        T.c0 = (float)(T.c0 - lp.phi);
++        T.c0 = (T.c0 - lp.phi);
+         for (iters = MAX_ITER; iters ; --iters) { /* Newton-Raphson */
+             t -= t1 = V(T,t) / DV(T,t);
+             if (fabs(t1) < EPS)
+--- a/test/gie/builtins.gie
++++ b/test/gie/builtins.gie
+@@ -627,7 +627,8 @@ Chamberlin Trimetric
+ 
-------------------------------------------------------------------------------
+ operation +proj=chamb   +R=6400000    +lat_1=0.5 +lat_2=2
+ 
-------------------------------------------------------------------------------
+-tolerance 0.00010 mm
++# Relaxed tolerance as a guard against numerical instability on non-amd64 
systems
++tolerance 0.5 mm
+ accept  2 1
+ expect  -27864.779586801 -223364.324593274
+ accept  2 -1
+@@ -3585,15 +3586,15 @@ Robinson
+ 
-------------------------------------------------------------------------------
+ operation +proj=robin   +a=6400000    +lat_1=0.5 +lat_2=2
+ 
-------------------------------------------------------------------------------
+-tolerance 0.00010 mm
+-accept  2 1
+-expect  189588.423282508 107318.530350703
+-accept  2 -1
+-expect  189588.423282508 -107318.530350703
++tolerance 0.0001 m
++accept   2 1
++expect   189588.4233  107318.5273
++accept   2 -1
++expect   189588.4233 -107318.5273
+ accept  -2 1
+-expect  -189588.423282508 107318.530350703
++expect  -189588.4233  107318.5273
+ accept  -2 -1
+-expect  -189588.423282508 -107318.530350703
++expect  -189588.4233 -107318.5273
+ 
+ direction inverse
+ accept  200 100
+@@ -4315,7 +4316,8 @@ van der Grinten II
+ 
-------------------------------------------------------------------------------
+ operation +proj=vandg2   +a=6400000    +lat_1=0.5 +lat_2=2
+ 
-------------------------------------------------------------------------------
+-tolerance 0.00010 mm
++# Relaxed tolerance as a guard against numerical instability on non-amd64 
systems
++tolerance 0.5 mm
+ accept  2 1
+ expect  223395.247850437 111718.491037226
+ accept  2 -1
diff --git a/debian/patches/series b/debian/patches/series
index 10f38f4..7a8abdb 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 manpage-section.patch
+avoid-numerical-differences-on-non-amd64-architectures.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-grass/proj.git

_______________________________________________
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel

Reply via email to