<div dir="ltr"><div>Hi Greg</div><div><br></div><div>The failures in the roundtrip suggest that the problem is in the inverse function of the spilhaus projection.</div><div>Part of the code used there was refactored end of March in master, and maybe the new code/formulation behaves better in NetBSD.</div><div><br></div><div>Could you test master in your environment?</div><div><br></div><div>Thanks.</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sun, 4 May 2025 at 15:02, Greg Troxel via PROJ <<a href="mailto:proj@lists.osgeo.org">proj@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Running regression tests with 9.6.0, I get a clean pass except for<br>
spilhaus. In particular, the adams_ws2 tests pass.<br>
<br>
I'm enclosing the spilhaus output for NetBSD 10 amd64; there are<br>
enormous (57m!) round trip deviations. The output on NetBSD 10 aarch4<br>
and NetBSD 9 earmv7hf-el (RPI3) is very similar, with the reported<br>
round-trip errors not quite the same, but from casual checking differing<br>
from those on 10/amd64 by around 0.001 mm. An example:<br>
<br>
FAILURE in spilhaus.gie(10):<br>
- roundtrip deviation: 57500.449588 mm, expected: 1.500000 mm<br>
+ roundtrip deviation: 57500.449662 mm, expected: 1.500000 mm<br>
<br>
This is of course puzzling, as surely this test passes on many other<br>
platforms, but also there is pretty clearly not terrible floating point<br>
on NetBSD in general because all the other tests are fine (and paranoia<br>
is happy), and e.g. geos regression tests pass.<br>
<br>
It seems like the spilhaus tests which are not round-trip all pass. I<br>
suspect this is a Clue. But round-trip tests do not seem new in<br>
spilhaus either.<br>
<br>
I glanced at the spilhaus and adams code and didn't immediately see any<br>
math functions being used that weren't normally used in proj, as a<br>
NetBSD bug in a little-used libm function could explain things,<br>
<br>
I wonder if anyone has run the regression test on other than<br>
Linux/Mac/Windows, and if so how it went.<br>
<br>
----------------------------------------<br>
17/67 Testing: spilhaus<br>
17/67 Test: spilhaus<br>
Command: "/tmp/work/geography/proj/work/proj-9.6.0/cmake-pkgsrc-build/bin/gie" "/tmp/work/geography/proj/work/proj-9.6.0/test/gie/spilhaus.gie"<br>
Directory: /tmp/work/geography/proj/work/proj-9.6.0/test<br>
"spilhaus" start time: May 04 07:53 EDT<br>
Output:<br>
----------------------------------------------------------<br>
-------------------------------------------------------------------------------<br>
Reading file '/tmp/work/geography/proj/work/proj-9.6.0/test/gie/spilhaus.gie'<br>
-------------------------------------------------------------------------------<br>
proj=spilhaus <br>
-------------------------------------------------------------------------------<br>
FAILURE in spilhaus.gie(10):<br>
roundtrip deviation: 57500.449588 mm, expected: 1.500000 mm<br>
-----<br>
FAILURE in spilhaus.gie(15):<br>
roundtrip deviation: 15011.025396 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(18):<br>
roundtrip deviation: 586478.398214 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(21):<br>
roundtrip deviation: 808104.443729 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(24):<br>
roundtrip deviation: 471175.633331 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(27):<br>
roundtrip deviation: 829216.052427 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(30):<br>
roundtrip deviation: 109204.184724 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(33):<br>
roundtrip deviation: 15011.074199 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(36):<br>
roundtrip deviation: 586477.606430 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(39):<br>
roundtrip deviation: 808104.315015 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(42):<br>
roundtrip deviation: 471177.085108 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(45):<br>
roundtrip deviation: 829214.811533 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(48):<br>
roundtrip deviation: 109202.584067 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(51):<br>
roundtrip deviation: 15011.026707 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(54):<br>
roundtrip deviation: 586478.292368 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(57):<br>
roundtrip deviation: 808104.391993 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(60):<br>
roundtrip deviation: 471175.627080 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(63):<br>
roundtrip deviation: 829211.773951 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(66):<br>
roundtrip deviation: 109199.737042 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(69):<br>
roundtrip deviation: 15012.084894 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(72):<br>
roundtrip deviation: 586477.605319 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(75):<br>
roundtrip deviation: 808102.648912 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(78):<br>
roundtrip deviation: 471175.632054 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(81):<br>
roundtrip deviation: 829214.829694 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(84):<br>
roundtrip deviation: 109202.218075 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(87):<br>
roundtrip deviation: 15010.957189 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(90):<br>
roundtrip deviation: 586477.284253 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(93):<br>
roundtrip deviation: 808104.333670 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(96):<br>
roundtrip deviation: 471167.978655 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(99):<br>
roundtrip deviation: 829212.867965 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(102):<br>
roundtrip deviation: 109202.667047 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(105):<br>
roundtrip deviation: 15010.074161 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(108):<br>
roundtrip deviation: 586478.164449 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(111):<br>
roundtrip deviation: 808104.382140 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(114):<br>
roundtrip deviation: 471175.496663 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(117):<br>
roundtrip deviation: 829214.900084 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(120):<br>
roundtrip deviation: 109203.234594 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(123):<br>
roundtrip deviation: 15010.340942 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(126):<br>
roundtrip deviation: 586477.614831 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(129):<br>
roundtrip deviation: 808112.028270 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(132):<br>
roundtrip deviation: 471175.528546 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(135):<br>
roundtrip deviation: 829214.842919 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(138):<br>
roundtrip deviation: 109202.561230 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(141):<br>
roundtrip deviation: 15006.580703 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(144):<br>
roundtrip deviation: 586477.940196 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(147):<br>
roundtrip deviation: 808104.487853 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(150):<br>
roundtrip deviation: 471174.492910 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(153):<br>
roundtrip deviation: 829211.268325 mm, expected: 10.000000 mm<br>
-----<br>
FAILURE in spilhaus.gie(156):<br>
roundtrip deviation: 109202.561384 mm, expected: 10.000000 mm<br>
-------------------------------------------------------------------------------<br>
proj=spilhaus rot=45 k_0=1 lat_0=-49.56371678 lon_0=66.94970198 azi=40...<br>
-------------------------------------------------------------------------------<br>
FAILURE in spilhaus.gie(375):<br>
roundtrip deviation: 70285.631874 mm, expected: 1.000000 mm<br>
-------------------------------------------------------------------------------<br>
proj=spilhaus <br>
-------------------------------------------------------------------------------<br>
FAILURE in spilhaus.gie(385):<br>
roundtrip deviation: 70285.631874 mm, expected: 1.000000 mm<br>
-------------------------------------------------------------------------------<br>
proj=spilhaus lon_0=10.1 <br>
-------------------------------------------------------------------------------<br>
FAILURE in spilhaus.gie(392):<br>
roundtrip deviation: 70285.638184 mm, expected: 1.000000 mm<br>
-------------------------------------------------------------------------------<br>
proj=spilhaus lat_0=30.1 <br>
-------------------------------------------------------------------------------<br>
FAILURE in spilhaus.gie(399):<br>
roundtrip deviation: 70285.633552 mm, expected: 1.000000 mm<br>
-------------------------------------------------------------------------------<br>
proj=spilhaus azi=9.1 <br>
-------------------------------------------------------------------------------<br>
FAILURE in spilhaus.gie(406):<br>
roundtrip deviation: 70285.658768 mm, expected: 1.000000 mm<br>
-------------------------------------------------------------------------------<br>
proj=spilhaus rot=40.1 <br>
-------------------------------------------------------------------------------<br>
FAILURE in spilhaus.gie(413):<br>
roundtrip deviation: 70285.631939 mm, expected: 1.000000 mm<br>
-------------------------------------------------------------------------------<br>
proj=spilhaus k_0=0.9 <br>
-------------------------------------------------------------------------------<br>
FAILURE in spilhaus.gie(420):<br>
roundtrip deviation: 70285.631939 mm, expected: 1.000000 mm<br>
-------------------------------------------------------------------------------<br>
total: 77 tests succeeded, 0 tests skipped, 56 tests FAILED!<br>
-------------------------------------------------------------------------------<br>
<end of output><br>
Test time = 0.02 sec<br>
----------------------------------------------------------<br>
Test Failed.<br>
"spilhaus" end time: May 04 07:53 EDT<br>
"spilhaus" time elapsed: 00:00:00<br>
_______________________________________________<br>
PROJ mailing list<br>
<a href="mailto:PROJ@lists.osgeo.org" target="_blank">PROJ@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/proj" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/proj</a><br>
</blockquote></div>