[OSM-talk] GPX trackpoint stacks
Nick Hill
nick at nickhill.co.uk
Fri Sep 15 23:30:44 BST 2006
I do favour the use of a 32 bit int. In fact, I am trialling the GPX
database based on exactly that right now :-)
Integers have many benefits over floats. There are many useful
offset-based clever things you can do with integers which due to
rounding errors in float calculations are impossible.
Not only do you get a better accuracy for a given memory usage, machines
need fewer steps to perform magnitude comparations using int compared to
float.
Robert Hart wrote:
>> 2^24 would be the significant accuracy of a single float.
>
> Why store the value in a float when you know it has a fixed range of +/-180
> degrees?
> With a 32-bit int, you could get accuracy of 360/(2^32), for the same memory
> usage.
>
> Rob
>
>
> This message has been scanned for viruses by MailControl - www.mailcontrol.com
>
More information about the talk
mailing list