https://bugzilla.wikimedia.org/show_bug.cgi?id=31259
--- Comment #5 from Roan Kattouw <[email protected]> 2011-09-30 13:19:20 UTC --- Despite pcache potentially messing things up, I have confirmed that srv186 (which runs hardy) returns 8.2E+7 while srv286 (which runs lucid) returns 82000000. I confirmed this using echo $wgOut->parse( '{{#expr:82000000}}' ); in eval.php . I tried both 1.17 and 1.18 but there's no difference. Also, scientific notation is only used in very few cases. The rules seem to be like this: * If the number is below a million (10^6), never use scientific notation. This happens on both hardy and lucid * If the number is above 10^14, always use scientific notation. This also happens on both hardy and lucid (!!! so this was broken all along for numbers greater than 100 billion) * If the number is between 10^6 and 10^14, only use scientific notation if there are /exactly/ two significant digits. This happens ONLY on hardy but NOT on lucid. Some examples: > echo $wgOut->parse( '{{#expr:870000}}' ); // less than a million <p>870000 </p> > echo $wgOut->parse( '{{#expr:8700000}}' ); // hardy: <1E14, two significant > digits <p>8.7E+6 </p> > echo $wgOut->parse( '{{#expr:8700000}}' ); // lucid: <1E14, two significant > digits <p>8700000 </p> > echo $wgOut->parse( '{{#expr:8720000}}' ); // three significant digits <p>8720000 </p> > echo $wgOut->parse( '{{#expr:9000000}}' ); // one significant digit <p>9000000 </p> // Big numbers >1E14: > echo $wgOut->parse( '{{#expr:900000000000000}}' ); <p>9.0E+14 </p> > echo $wgOut->parse( '{{#expr:940000000000000}}' ); <p>9.4E+14 </p> > echo $wgOut->parse( '{{#expr:943000000000000}}' ); <p>9.43E+14 </p> > echo $wgOut->parse( '{{#expr:943250000000000}}' ); <p>9.4325E+14 </p> -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
