Skip to content

returning NaN caused due to Floating Point Precision Error  #52

Description

@Emmanuel-Rods

this is a very specific edge case when comparing the distance of the zip codes 15601 and 15601

zipcodes.distance(15601, 15601); //expected to be 0

But it returns NaN due to the rounding error caused by distance method which passes 1.0000000000000002 when passed to Math.acos() which returns NaN

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions