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

From: Date: Fri, 31 Dec 2004 20:42:59 +0000
Subject: Re: Fw: [PEAR-DEV] Math::Math_Algebra package ?
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-35280@lists.php.net to get a copy of this message
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. 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)
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
How are the features stored ? (not XML ???) Right now the class offers two ways of output: text and HTML. 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 [^]).
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 ?
Happy new year, - Louis

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