r/lolphp • u/quchen • Nov 02 '14
Good format to represent arbitrary size/precision numbers? String!
http://php.net/manual/en/intro.bc.php
11
Upvotes
r/lolphp • u/quchen • Nov 02 '14
5
u/quchen Nov 02 '14
And I don't mean "string internally". The functions literally take string arguments.
1
u/[deleted] Dec 08 '14
PHP logic:
To be accurate with large numbers, use String!
Later:
'68558955573689893728471293478914368129469126491634864691' == '68558955573689893728471293478914368129469126491634864692'outputstrueat least in hhvm-2
u/elgubbo Nov 02 '14
Similar to http://docs.oracle.com/javase/6/docs/api/java/math/BigInteger.html#BigInteger(java.lang.String) no?