https://bugzilla.wikimedia.org/show_bug.cgi?id=33571
--- Comment #5 from Antoine "hashar" Musso <[email protected]> 2012-01-07 09:39:49 UTC --- PHP log() and log10() are not reliable: php -r 'printf("%.32f\n", log(pow(10,15),10) );' 15.00000000000000355271367880050093 php -r 'printf("%.32f\n", log10(pow(10,15)) );' 14.99999999999999822364316059974954 Both should give exactly 15. php -r 'printf("%.32f\n", log(pow(10,15)-1,10) );' 15.00000000000000177635683940025046 That last one should give 14.99<something> So I think it is safer to reimplements floor(log10()) by avoiding float type entirely. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
