Open GoogleCodeExporter opened 8 years ago
Given that floating point numbers are lossy by design, I'm not yet convinced
that performing a round in the doubleToLong conversion will do much to protect
users from cumulative errors. Gaining more control over the possibility of
numerical errors would, I believe, necessitate using BigDecimal for internal
representation. I did try that implementation once but found it to be a massive
trade-off both in terms of memory storage and in execution speed of common
calculations.
In short: SimpleLatLng knowingly sacrifices mathematical accuracy for speed.
With that said, I would love to consider an example case, if you could please
provide one, which demonstrates the unbounded cumulative errors you're worried
about.
Original comment by TylerCo...@gmail.com
on 5 Mar 2015 at 6:19
Original issue reported on code.google.com by
mark.c.s...@gmail.com
on 3 Mar 2015 at 9:27