Re: Math_Function

From: Date: Tue, 24 Jan 2006 20:09:42 +0000
Subject: Re: Math_Function
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-41079@lists.php.net to get a copy of this message
Arpad Ray wrote : > I missed the original comment but I absolutely agree that we need a more > general package, akin to CPAN's Math::Symbolic. I agree with that, we should have a package that handles math expressions, to reduce the redundant parsing work performed in packages. Now, including derivatives or not in such a package is another question, I would rather like having separated packages for each operations based on the "expression" package, than everything implemented in it. That would probably save it from too much overhead (Math_Function is currently 2x slower than Math_Derivative, for a less simplified result). It would also increase the compatibility between packages, now the work scheme is : [string] -> [package1: -> parse -> work -> toString] -> [package2 : -> parse -> work -> toString] -> [result]. Using an universal format for input/return value (Math_Expression) would make it be: [string] -> [Math_Expression: parse] -> [package1: -> work] -> [package2: -> work ] -> [Math_Expression: toString] -> [result] (notice the number of operations reduced from 6 to 4, when combining only 2 packages) So the packages are more focused on their job. I think it would be a great improvement to the Math section of PEAR which is now in my opinion a bit fragmented. What do you think about that ? It would be better to discuss it with packages' maintainers that would use it (input syntax, format, needs...). I'm looking forward to it, Kind regards. -- Etienne Kneuss http://www.colder.ch/ colder@php.net

« previous php.pear.dev (#41079) next »