Re: RFC: New math functions: log2, etc

From: Date: Sat, 04 Aug 2001 16:10:25 +0000
Subject: Re: RFC: New math functions: log2, etc
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-62073@lists.php.net to get a copy of this message
> At 01:53 AM 8/4/2001 +0200, Jeroen van Wolffelaar wrote: > > > 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] > >However, 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? > -Sterling Jeroen

« previous php.dev (#62073) next »