Re: PHP can't compare...

From: Date: Mon, 10 Dec 2001 18:49:50 +0000
Subject: Re: PHP can't compare...
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-72982@lists.php.net to get a copy of this message
> But my suggestion only produces rounding errors when the developer is trying to operate on > floats > with results of precision greater than 14 decimals. These developers should already know they > MUST > use bc or gmp in such cases. > > You may say it should be "up to the developer", but there is no discretion that you > are leaving with > the developer that can be meaningfully used! > > Instead you are saying that we cannot protect users who are using less than 14 decimals through > rounding because of the potential loss of control for developers who are using 14 decimals or > more > who have ALREADY been told NOT to use this function! > > This strikes me as frankly bizarre! The current situation benefits noone! My suggestion > benefits > EVERYONE except the small set of developers using medium/high precision (> 14 decimals) for > whom > these functions are already inappropriate. They, therefore, lose nothing! The rest do gain, a > lot! > > REMEMBER: This is emphatically NOT the same case as rounding floats on general arithmetic > functions > where the rounding errors can easily propagate, rounding then would be a VERY BAD THING. This > rounding will NEVER "pollute" a float, since the functions/operators do not return > floats! Stop crying. I don't know what your cursus and/or specilities and I really don't care as far it's not the discussion. But you use php as a programming langage (yes it is), the problem with scripting langage for the web is the common people thinks cool, easy langange, easy learning curve, I am a programmer. In their dreams...MS meats the same problem with VB. You have to understand basic concepts before starting to learn a programming langage (I dont talk about design and so on....), one of them is how to work with floating numbers. A lot of people told you the how and why. You still cry about blah blah and blah. Take the all current thread, read it, follow the links (google), and come back if you find a real problem with php and floats. My 0 cents. pa -- Pierre-Alain Joye Freelance Developpements et Services web/intranet pajoye@tuxfamily.org

« previous php.dev (#72982) next »