<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Bug (+ fix) in the DST class</title><link>https://sourceforge.net/p/geographiclib/news/2022/06/bug--fix-in-the-dst-class/</link><description>Recent changes to Bug (+ fix) in the DST class</description><atom:link href="https://sourceforge.net/p/geographiclib/news/2022/06/bug--fix-in-the-dst-class/feed.rss" rel="self"/><language>en</language><lastBuildDate>Mon, 13 Jun 2022 11:49:15 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/geographiclib/news/2022/06/bug--fix-in-the-dst-class/feed.rss" rel="self" type="application/rss+xml"/><item><title>Bug (+ fix) in the DST class</title><link>https://sourceforge.net/p/geographiclib/news/2022/06/bug--fix-in-the-dst-class/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;There's a sign error in the DST class in GeographicLib 2.1.  This affects the &lt;code&gt;DST::refine&lt;/code&gt; member function which isn't used elsewhere in GeographicLib.  Here's the fix&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gh"&gt;diff --git a/src/DST.cpp b/src/DST.cpp&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="gh"&gt;index 6fc3ee90..1e70bfd1 100644&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="gd"&gt;--- a/src/DST.cpp&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="gi"&gt;+++ b/src/DST.cpp&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="gu"&gt;@@ -67,7 +67,7 @@ namespace GeographicLib {&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt;    fft_transform(data, F+_N, true);&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt;    for (int i = 0; i &amp;lt; _N; ++i) data[i] = F[i+_N];&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt;    for (int i = _N; i &amp;lt; 2*_N; ++i)&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="gd"&gt;-      F[i] = (-data[2*_N-1-i] + F[2*_N-1-i])/2;&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="gi"&gt;+      F[i] = (data[2*_N-1-i] - F[2*_N-1-i])/2;&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt;    for (int i = 0; i &amp;lt; _N; ++i)&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt;      F[i] = (data[i] + F[i])/2;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt;  }&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Charles Karney</dc:creator><pubDate>Mon, 13 Jun 2022 11:49:15 -0000</pubDate><guid>https://sourceforge.netbb00767d4f338003ca3a2699a135d55ea292e71a</guid></item></channel></rss>