Re: RFC: New math functions: log2, etc

From: Date: Tue, 07 Aug 2001 16:04:13 +0000
Subject: Re: RFC: New math functions: log2, etc
References: 1 2 3  Groups: php.dev 
Request: Send a blank email to php-dev+get-62431@lists.php.net to get a copy of this message
Aparently PAN (the newsreader I used) does not make the right stuff for the MARC archive to add the poster name. -- Jesus M. Castagnetto (jmcastagnetto@castagnetto.org) In article <20010806.181917.6939507.3684@vaio.castagnetto.org>, "Jesus M. Castagnetto" <jmcastagnetto@php.net> wrote: > In article > <5.1.0.14.0.20010804125846.009f0b60@mail.designmultimedia.com>, > "Sterling Hughes" <sterling@designmultimedia.com> wrote: [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? > Perhaps not too many people that use PHP for biz purposes use them, but > the few that do use it for some scientific/math stuff will appreciate > those functions, in particular when dealing with numerical methods > (derivation, integration, etc.). Of course I am all for putting them in > a extension, perhaps of GSL (the lib that AFAICT is more complete among > the Open Sources ones) > >>> 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? >> 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 ;-) -Sterling > Mea culpa, I use those for geometrical/trigonometrical conversions > (along with some PHP implemented versions of the hyperbolic funcs and > the like), and they are part of the math.h IIRC and the ISO specs for > the C library. When we get ready the (future) GSL/math extension > (matrices, vectors, yes!!!!), we could easily move them there (same for > some functions). Apropos, how would I go about implementing a new > variable type, namely complex numbers? AFAICT, we can do the vectors in > GSL as linear arrays, I got no clue as to how to translate the comple > number record type into something already defined in PHP/Zend. (Please > cc me as I usually read this via the news interface)

« previous php.dev (#62431) next »