Fixing arbitrary 40 digit max precision in printf code
| From: | Rasmus Lerdorf | Date: | Wed, 29 Apr 2009 04:09:44 +0000 |
| Subject: | Fixing arbitrary 40 digit max precision in printf code | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-43794@lists.php.net to get a copy of this message | ||
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