Re: [PEPr] Comment on Math::Math_Polynomial (Re-proposal)
| From: | Etienne Kneuss | Date: | Mon, 19 Dec 2005 15:32:42 +0000 |
| Subject: | Re: [PEPr] Comment on Math::Math_Polynomial (Re-proposal) | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-40792@lists.php.net to get a copy of this message | ||
The code is mostly finished:
http://www.colder.ch/repository/php/Math_Derivative/Math_Derivative.php
>
>Etienne: What did you have in mind for an API?
>Parameter/return value is a string? Parameter is some new type/generic Math_Equation object?
>
>
>
I was thinking about parameter/return value as strings.
There are two main issues:
1) lack of simplification
My workaround: I've no magic method to simplify the results. A
complete simplify method would be a enormous work and I can't afford it.
Some simple simplification rules could be implemented though.
2) my package interprets "a^2" as "a*a" as its the most common way to
express powers. But this is not the expected result when using php's
evaluator (bitwise XOR operator).
So: Its worthless trying to evaluate results that contains "^"
using php's eval().
My workaround: implementing an eval method that internally evaluates
powers before using eval() [not implemented yet]
--
Etienne Kneuss
http://www.colder.ch/
colder@php.net