junzis/pyModeS

calculation of NL for -87 and 87 latitudes

wrobell opened this issue · 1 comments

The code is in cprNL function is

if lat == 87 or lat == -87:
    return 2

Considering that latitude is a float obtained using IEEE-754 standard, IMHO, it is highly unlikely we will hit -87/87 exactly (https://docs.python.org/3/tutorial/floatingpoint.html). Should math.isclose be used here (https://docs.python.org/3/library/math.html#math.isclose)?

You are absolutely right! Now fixed with commit ed18352.