Locations inside polar ring, will have polar days (sun never sets) and polar nights (sun never rises).
private func hourAngleOfSunrise(latitude: Float64, solarDeclination: Float64, solarElevation: Float64) throws -> Float64
This function return NAN when sun never rises or sun never sets.
I have made a work around to solve this problem by throw an error from there (and re-throw it along the method chain). I don't have a better solution to handle this situation, so I hope you can look into it.
The workaround I've made was in commit eca031c.
Thank you.