Re: I need a math genius!

From: Date: Mon, 12 May 2003 14:11:38 +0000
Subject: Re: I need a math genius!
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-147301@lists.php.net to get a copy of this message
You can do the old factoring way you learned in grade school where the first number is actually (0*1)+(3*10)+(6*100)+(2*1000)+(7*10000)+... Although you don't have to do it in that detail. Perhaps breaking it into one factor less than the max PHP can handle. When recombining into a string, you just need to keep track of any carry over. It seems like a lot of work though. Have you looked at limits of other scripting languages like Perl, Python, or Ruby? Perl might be your best bet since it been around the longest. On Friday, May 9, 2003, at 06:46 PM, Jason Caldwell wrote:
Hi I need to divide, subtract and add *very* large unsigned integer numbers -- no floating point numbers. In PHP I'm limited to an integer no larger than: 2,147,483,647 ... How is it possible to calculate much, much larger numbers? For example, say I want to add the following number: (7827363524473290039928827730299288277102938474655367299188272630 + 7829817981291982837938719793747646199192739190198791238479832) --- I'm ok at math, but not too skilled in it -- so, if the above can be calculated using Floating Numbers - great! -- however, if possible, I'd like to stick to unsigned integers. Thanks, Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Brent Baisley Systems Architect Landover Associates, Inc. Search & Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577


« previous php.general (#147301) next »