php - Convert large decimal numbers to hexadecimal -


i had convert large decimal number hexadecimal use function dechex.

so code go these :

$large_number = '637188198442990866068821375' $large_hex = dechex($large_number) 

but when print variable $large

echo $large 

i got these value 7fffffffffffffff , sure lose precision.

what can full precision in these operation ?

the largest integer javascript can handle 2^52. +/- 9007199254740992

what javascript's highest integer value number can go without losing precision?

you'll either need slice integer before hits javascript or @ 1 of big integer libraries.


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -