On Mon, 24 Mar 2008 13:10:17 -0600, [EMAIL PROTECTED] wrote:
Beware: round() apparently has changed its behavior from PHP 4. For
certain special numbers that seem to be multiples of 100,000, the
return
value is in exponential format, rather than the usual decimal format.
Some
of these
[EMAIL PROTECTED] wrote:
On Mon, 24 Mar 2008 13:10:17 -0600, [EMAIL PROTECTED] wrote:
Beware: round() apparently has changed its behavior from PHP 4. For
certain special numbers that seem to be multiples of 100,000, the
return
value is in exponential format, rather than the usual decimal
At 10:55 AM -0600 3/25/08, [EMAIL PROTECTED] wrote:
Thanks for the info, Jeremy. Regardless of the technical details, my code
still broke. I am little discouraged that an operation that should be so
simple has these sorts of gotchas.
Not that this helps/hurts your observation.
What I find
Thanks for the info, Jeremy. Regardless of the technical details, my code
still broke. I am little discouraged that an operation that should be so
simple has these sorts of gotchas.
BTW, I ended up casting to int as my solution.
Kirk
Jeremy Privett [EMAIL PROTECTED] wrote on 03/24/2008
Beware: round() apparently has changed its behavior from PHP 4. For
certain special numbers that seem to be multiples of 100,000, the return
value is in exponential format, rather than the usual decimal format. Some
of these special values are 120, 140, 230, which are returned
as
[EMAIL PROTECTED] wrote:
Beware: round() apparently has changed its behavior from PHP 4.
This is actually a change in the behavior of the float type, not the
round function. Replace your round() with a cast to float and you'll see
the exact same result.
--
Jeremy Privett
C.E.O. C.S.A.
Omega
Jeremy Privett wrote:
[EMAIL PROTECTED] wrote:
Beware: round() apparently has changed its behavior from PHP 4.
This is actually a change in the behavior of the float type, not the
round function. Replace your round() with a cast to float and you'll
see the exact same result.
Also, as a
On Mon, 24 Mar 2008 13:10:17 -0600, [EMAIL PROTECTED] wrote:
Beware: round() apparently has changed its behavior from PHP 4. For
certain special numbers that seem to be multiples of 100,000, the return
value is in exponential format, rather than the usual decimal format.
Some
of these special
8 matches
Mail list logo