RFC: New math functions: log2, etc
| From: | jeroen@php.net | Date: | Fri, 03 Aug 2001 23:41:50 +0000 |
| Subject: | RFC: New math functions: log2, etc | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-62019@lists.php.net to get a copy of this message | ||
Hi,
I've got the following suggestion, about some of the new math-functions
recently added:
log2 and log10: remove from PHP
exp2 and exp10: remove from PHP
(the pow-way is also simply better, in the case of exp2/10, that is)
Add second parameter to log, to specify base. (better than writing
log(a)/log(b))
Optional: add second parameter to exp, to specify base.
I am not in favor of the latter one, since exp(exp,base) === pow(base,exp).
But for consistency with log, you could argue to do so.
Remove cbrt?, isn't used much, and the name isn't as familiar as sqrt.
expm1, log1p: Could be useful for some people, so leave them there.
I'd be glad to hear your opinion,
Jeroen