[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-internals
Subject:    [PHP-DEV] Fixing arbitrary 40 digit max precision in printf code
From:       Rasmus Lerdorf <rasmus () lerdorf ! com>
Date:       2009-04-29 4:09:44
Message-ID: 49F7D308.10708 () lerdorf ! com
[Download RAW message or body]

Prompted by
http://www.exploringbinary.com/print-precision-of-dyadic-fractions-varies-by-language/

I agree with the author that 40 is a weird arbitrary limit to impose
here.  As he writes, the smallest float that will fit in a double is
1074 decimal digits and the largest is 53.  I don't see a reason we
shouldn't be in line with Perl and C here.

It's a couple of minor constant size changes in main/snprintf and
ext/standard/formatted_print.c plus a test case fix.

-Rasmus

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic