Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] Perl floating point addition oddness

Expand Messages
  • merlyn@stonehenge.com
    ... Kelly Not trolling. I m trying to convert node latitude/longitudes in Kelly openstreetmap.org into 63-bit INTs for sqlite3 rowid number. The problem is
    Message 1 of 4 , Jun 3, 2009
    • 0 Attachment
      >>>>> "Kelly" == Kelly Jones <kelly.terry.jones@...> writes:

      Kelly> Not trolling. I'm trying to convert node latitude/longitudes in
      Kelly> openstreetmap.org into 63-bit INTs for sqlite3 rowid number.

      The problem is that Perl uses doubles inside for everything, including
      integers, and the integer part of the floating point number is somewhat
      limited, as you see (I think it's only 56 bits). That's why Math::BigInt is
      needed here.

      --
      Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
      <merlyn@...> <URL:http://www.stonehenge.com/merlyn/>
      Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
      See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
    Your message has been successfully submitted and would be delivered to recipients shortly.