Re: Integer question

From: Date: Thu, 22 Mar 2007 19:38:12 +0000
Subject: Re: Integer question
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-251125@lists.php.net to get a copy of this message
Tijnema ! wrote: > On 3/22/07, Jochem Maas <jochem@iamjochem.com> wrote: >> Matt Carlson wrote: >> > When dealing with large numbers inside of php, I know at the int >> limit, a variable is recast into float. >> > >> > >> > >> > 1). How do you return the true number of the float when it reaches >> the upper limits of mysql's bigint (9223372036854775807). >> >> I can't see how that is possible, once its 'floated' the precise int >> is gone. >> although you might consider returning the given mysql bigint field as a >> string 'CAST() AS STRING' (or whatever the syntax is) and then using >> the string inconjunction with >> the bc or gmp extensions. >> >> > 2). How do you handle numbers that large, while maintaining precision. >> >> keep them as strings - and/or use a 64bit machine? > > a 64bit machine would make the number larger, not unlimited :) this I understand, 64bits may give him enough precision for his needs though. > >> >> > 3). Is there a php equivalent of unsigned? >> >> no >> >> > >> > Thanks all >> > >> > >> > >> > >> > >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> >>

« previous php.general (#251125) next »