Re: PHP can't compare...
| From: | Stig Venaas | Date: | Wed, 05 Dec 2001 10:53:38 +0000 |
| Subject: | Re: PHP can't compare... | ||
| References: | 1 2 3 4 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-72564@lists.php.net to get a copy of this message | ||
On Wed, Dec 05, 2001 at 12:09:33PM +0200, Zeev Suraski wrote:
> There's no clean 3.55, there simply isn't. It's just how computers
> work. The only way to do what you're asking for is to switch to a whole
> different string-based representation, which is going to slow things down
> very considerably.
I guess one can try to think of 355 binary which is easy enough. But
since 100 is not a power of 2, you quickly run into problems. Several
numbers that have a finite decimal representation are not finite in
binary. In the trinary system 1/3 would be finite, but not in decimal
or binary.
Stig