Re: RFC - Two more Math packages: Math_Integer and Math_Fibonacci

From: Date: Thu, 02 Jan 2003 14:21:06 +0000
Subject: Re: RFC - Two more Math packages: Math_Integer and Math_Fibonacci
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-12024@lists.php.net to get a copy of this message
I tried the tests in testMath_Fibonacci.php and they didn't work for me. It seems gmp_init() doesn't like strings representing non-integers (I'm using GMP 4.0.1). If I change line 90 on Integer.php from: $this->_value = gmp_init(strval($num)); to: $this->_value = gmp_init(strval(round($num))); It works. Am I missing something here? Oh, and +1 for both packages. El Mié 01 Ene 2003 04:46, Jesus M. Castagnetto escribió: > Just finished pearizing a couple of Math_* packages. Math_Integer will use > GMP or BCMATH to deal w/ big integers, otherwise it will fall back to the > standard PHP integer representation (in which case it will refuse to > initialize objects w/ a value bigger than the maximum for signed long). > > Get it doing: > > $ pear install > http://www.scripps.edu/~jesusmc/stuff/Math_Integer-0.8.tgz > > Math_Fibonacci, is a class w/ static methods to create and manipulate > numbers in the Fibonacci series (0, 1, 1, 2, 3, 5, ...). It uses > Math_Integer so install that one first. > > Get Math_Fibonacci by doing: > > $ pear install > http://www.scripps.edu/~jesusmc/stuff/Math_Fibonacci-0.8.tgz > > Comments/ideas/+1s will be appreciated ;-) > > Happy New Year everyone! > > > > ===== > --- Jesus M. Castagnetto (jcastagnetto@yahoo.com) > > Research: > http://metallo.scripps.edu/ > Personal: http://www.castagnetto.org/ > > __________________________________________________ > Do you Yahoo!? > Yahoo! Mail Plus - Powerful. Affordable. Sign up now. > http://mailplus.yahoo.com

« previous php.pear.dev (#12024) next »