--- sunriset.cpp.orig 2015-06-01 08:25:41.000000000 -0500 +++ sunriset.cpp 2016-05-05 08:11:03.000000000 -0500 @@ -92,7 +92,7 @@ /* compute the diurnal arc that the sun traverses to reach the specified altitide altit: */ double cost = (sind(altitude) - sind(pRun->latitude) * sind(sdec)) / (cosd(pRun->latitude) * cosd(sdec)); - if (abs(cost) < 1.0) + if (fabs(cost) < 1.0) diurnalArc = 2*acosd(cost)/15.0; /* Diurnal arc, hours */ else if (cost>=1.0) diurnalArc = 0.0; // Polar Night