Re: Fw: [PEAR-DEV] Math::Math_Algebra package ?

From: Date: Sat, 01 Jan 2005 09:53:35 +0000
Subject: Re: Fw: [PEAR-DEV] Math::Math_Algebra package ?
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-35291@lists.php.net to get a copy of this message
Louis Mullie wrote:
Hi Louis, Same answer for float, complex or big numbers?
Floats will be just a matter of adjusting the regexes. Divisions that give floats are left as fractions by defautl for now. Complex numbers are not yet implemented, but PEAR's Math_Complex package should do most of the job. Ditto for big numbers w/ PHP's BC extension.
The algebra depends on the groups or body. e.g. Some equation can be solved in complex domain but not as real
Can we factorize the most as Exp = a + X.(b + X.(c + X.(...))) or as Exp = (a + X).(b +X).(c +X) ...
I'm not sure what you mean here, but I can tell you the first way will work and the second is not yet implemented (parentheses * or / parentheses)
My '.' should be a '*', sure you manage parentheses... The question is can that be transformed additive first or multiplicative first ?
e.g.        4*X^2 - 2*X - 12
is also    (2*X + 3)*(2*X - 4)
normalized 4*(X + 3/2)*(X - 2)
So far it's given variables X and Y how is the expression factorized ? X first: X^3*Y^2 or Y first: Y^2*X^3 ?)
Following alphabetical order, then descending order of the powers. I'll have to implement/find a real sorting algorithm for multi-variable terms, i.e. xyz comes before xy because xyz is x^1y^1z^1 and xy is x^1y^1z^0
Can we have factors and unknowns ?
How are the features stored ? (not XML ???)
Right now the class offers two ways of output: text and HTML.
I was asking about storage, not display. So far I understand an expression is only text ?
There is also an option to output to MathML, but it uses an external class (http://www.jcphysics.com/ASCIIMath/), and there should be a separate PEAR package built for this class.
What is the notation ?
For HTML output the powers and fractions are formatted with the <sup> and <sub> elements. For text output, the notation is the same as PHP's (plus the exponent operator, which is the caret [^]).
Input the same ?
Some computed algebras exist, PHP & Pear allmost give access to such oriented systems. Wheels are allready invented here, Better make a PHP/Pear 4WD car, a wheel in each algebra system existing.
I already use the Math_Fraction package for fractions, and as stated above I'll probably be using the Math_Complex and the BC extension very soon. I cannot see what else PEAR or PHP could provide me that would be useful in building this ?
I was meaning outside PEAR, as Maple, Matlab, Mathematica ... They do the stuff since years. It could be more valuable to open some gates (without bill, possibly) to them.
Happy new year, - Louis Bonne année ! (X^2 - 4010*X + 4020025)
-- bertrand Gugger (toggg)

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