June 18, 2013

Post: PHP vs. BIGINT vs. float conversion caveat

… 64-bit range fully, floats might save the day. The trick is that PHP floats are in fact doubles, i.e. double-precision 64-bit… handling large numbers stored as float (especially on 32-bit systems where 32-bit int overflow will implicitly convert to float) and getting strange bugs, remember…

Comment: PHP vs. BIGINT vs. float conversion caveat

…. float conversion caveatHere’s a quick excerpt Sometimes you need to work with big numbers in PHP (gulp). For example, sometimes 32-bit… mess that 64-bit integers are in PHP. But if the numbers you use do not cover 64-bit range fully, floats might save the day. The trick is that PHP floats are in fact doubles, i.e. double-precision 64-bit