Re: RFC: New math functions: log2, etc
| From: | Sterling Hughes | Date: | Sat, 04 Aug 2001 17:01:42 +0000 |
| Subject: | Re: RFC: New math functions: log2, etc | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-62076@lists.php.net to get a copy of this message | ||
At 06:10 PM 8/4/2001 +0200, Jeroen van Wolffelaar wrote:
At 01:53 AM 8/4/2001 +0200, Jeroen van Wolffelaar wrote:I mean mathematically yep... ;-)log(a) / log(n) is not that much harder, and its the right way, imho.Yes, you're right that it is the right way. But for example, for tan(x), the "right way" is sin(x)/cos(x).(Not such a good example, but anyway)As you said :-) as an anal note, tan(x) is the correct notation, just as logarithms are also a wrapper type in themselves, log is also the "correct" notation. What is 'correct' here, mathematically correct, or something else? Mathematically you're right of course. But in mathematica & co, you'll also get a much nicer view on formula's than in PHP...
[snip]Yeah, I'd say so... the reason? IMHO, no one was either paying attention to revert them, or wanted to revert someone else's commit (common problem ;-) -SterlingHowever, IMO the log, exp, sinus, etc. functions should be in the core.Yes, I agree, however, expm1 and log1p don't. I agree. Do you suggest here to hold these two, until some kind of advanced-math-extension will be added? Some other thing, the M_* constants. I always wondered why for example M_2_SQRTPI (2/sqrt(PI)) was in PHP. IMO, there are only one or two essential constants to be in the core: PI (of course), and (possibly) the EULER-constant. What about adding PI and, possibly, EULER as constant (without the M_), and deprecating those M_ constants? Or at least promote them to the math-extension?