Re: bcmath, standart ?

From: Date: Thu, 13 Jun 2002 17:35:36 +0000
Subject: Re: bcmath, standart ?
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-6994@lists.php.net to get a copy of this message
On Thu, 13 Jun 2002 09:24:17 -0700 (PDT) "Jesus M. Castagnetto" <jcastagnetto@yahoo.com> wrote: > You might want to consider using a fallback method: > > If the bcmath module is loaded use bcmod() otherwise check if the fmod() > function is defined (added to php4/ext/math.c back in February IIRC) and use > that one, or if that functions is not defined fall back to a simple btw, the fmod is defined in ext/standard/math.c. I did not know this function, nice :). > function modf($a, $b) { > $r = $a / $b; > $i = intval($r); > return ($r - $i) * $b; > } > (from some old code for numPHP I got lying around) Back to the classic :). > > As far as GMP, for what I see in the PHP source only the integer functions have > been wrapped, not the floating point ones. unsigned int, but not enough :(. Thanks for the infos, will go with that. pa

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