Re: [PHP] Round
- From: koen@xxxxxxxxxxxxxxx ("Koen van den Boogaart")
- Date: Wed, 29 Aug 2007 21:42:04 +0200
Some information from Wikipedia: http://en.wikipedia.org/wiki/Negative_zero.
Says in math a negative zero doesn't exist, in computing it does. Strange
thing is that PHP4 and 5 until at least 5.1.6 (see Jim Lucas) round() gives
a float(0) and then 5.2.3 gives float(-0). I'll report a bug.
""Richard Lynch"" <ceo@xxxxxxxxx> wrote in message
news:51163.98.193.37.55.1188412949.squirrel@xxxxxxxxxxxxxxxx
On Wed, August 29, 2007 11:38 am, Zoltán Németh wrote:.
2007. 08. 29, szerda keltezéssel 09.29-kor Jim Lucas ezt Ãrta:
Daniel Brown wrote:
On 8/29/07, Richard Heyes <richardh@xxxxxxxxxxx> wrote:doesn't exist in
Koen van den Boogaart wrote:
No, I want it to go to float(0), so minus the minus. "-0"
math, as far as I know. Probably a precision thing.
I missed the start of this thread...
Technically, -0 exists and is a tautology to +0.
That said, PHP should not be outputting -0 for a round() operation,
nor abs() for that matter.
Check http://bugs.php.net with your PHP version for a similar problem.
--
Please vote for this great band:
http://acl.mp3.com/feature/soundandjury/?band=COMPANY-OF-THIEVES
Requires email confirmation.
One vote per day per email limit.
Obvious ballot-stuffing will be revoked.
- References:
- Round
- From: "Koen van den Boogaart"
- Re: [PHP] Round
- From: Richard Heyes
- Re: [PHP] Round
- From: "Koen van den Boogaart"
- Re: [PHP] Round
- From: Richard Heyes
- Re: [PHP] Round
- From: "Daniel Brown"
- Re: [PHP] Round
- From: Jim Lucas
- Re: [PHP] Round
- From: Zoltán Németh
- Re: [PHP] Round
- From: "Richard Lynch"
- Round
- Prev by Date: Re: [PHP] PhP / MySQL problem
- Next by Date: Re: [PHP] Internet Explorer Caching
- Previous by thread: Re: [PHP] Round
- Next by thread: Re: [PHP] Round
- Index(es):
Relevant Pages
|