Whole file
geographiclib/geographiclib-python
The author described this change as “Fix bug in geodesic inverse solution for very prolate ellipsoids.”. It counts as a record because the check below fails on the code as it stood at a1a9d0abb and passes on 07fde3b06, with nothing else changed between the two runs.
Fix saved2025-08-21
Sharing licenceMIT · LICENSE
Change size+1 −1
What the code was meant to do, written into the code itself as a save note
Fix bug in geodesic inverse solution for very prolate ellipsoids.
The change
| 804 | 804 | # | |
| 805 | 805 | # In fact, we will have sig12 > pi/2 for meridional geodesic which is | |
| 806 | 806 | # not a shortest path. | |
| 807 | - | if sig12 < 1 or m12x >= 0: | |
| 807 | + | if sig12 < Geodesic.tol2_ or m12x >= 0: | |
| 808 | 808 | if (sig12 < 3 * Geodesic.tiny_ or | |
| 809 | 809 | # Prevent negative s12 or m12 for short lines | |
| 810 | 810 | (sig12 < Geodesic.tol0_ and (s12x < 0 or m12x < 0))): |
The check that tells the two apart
fail→pass·geographiclib/test/test_geodesic.py::GeodSolveTest::test_GeodSolve100
Check file geographiclib/test/test_geodesic.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before ita1a9d0abb3d085bbaad0100d502129209b6ca5ca
Broken version dated2025-08-21
Modulegeographiclib.geodesic
Units changedGeodesic
Fingerprint1677b3ef1c86c463
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.
Other bugs found in geographiclib/geographiclib-python
- 2022-03-08Add planimeter reverse arctic test to catch transit bug and fix.
- 2021-07-28Fix bug where a geodesic with lat1 = 0 and lat2 = nan was treated as equatorial (bug found 2021-07-26).
- 2019-09-10Implement fix to AddEdge/transitdirect bug in Java, JS, + Python libraries + add test case. (Already done for C++ + C; not necessary for MATLAB + Fortran.)
- 2015-09-23* Fix geodesic inversion so that nan + point on equator or pole returns all nans. Update tests to check this. * Fix bug in gedistance.m in handling equatorial lines.
- 2015-09-17* Create and install geographiclib.js and geographiclib.min.js. * Complete the unit tests for Java and JavaScript packages. * Introduce GeodesicMask.STANDARD into Java package. * Fix bug in normalizat