|
-
Dec 8th, 2003, 11:41 PM
#1
Thread Starter
New Member
algorithm to simlify eqn
an anyone please help me to derive the
algorithm to simplifying linear equation?
For example, I have one eqn like, (3 X1+ 4
X2 +5) /5 + (3 X1-7 X2 - 6)/6 = 2
it should give 23 X1 - 11 X2 -60 =0;
In general it should outputted complex
equations in form of A X1 + B X2 +.... + c =0
actually i am trying to develop an apllication which generates equation in complex mode like my examp but variables are not less than 10 and i need to simplify it to feed it in next module which takes eqn only as A X1 + B X2 +.... + c =0
thanks in advance.
-
Dec 9th, 2003, 12:54 AM
#2
transcendental analytic
in that example you need distribute / over + and -, then sort out constants for each variable, you'd need a parser though and a reduction engine
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Dec 9th, 2003, 05:26 AM
#3
Thread Starter
New Member
Can i get something more
thanks,
Got some idea. Can i get those required stuffs/ engine readily available or i have to develop those my own? If possible, if you can give some related codes or available sources/example, it will be a great to me .
Thanks
-
Dec 9th, 2003, 09:07 AM
#4
transcendental analytic
easiest would be to use one already available like haskell google around for parsers calculators and equation solvers etc.. theres loads of stuff available.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Feb 27th, 2004, 10:43 AM
#5
New Member
I'm looking for the same thing, but am having no luck finding anything. Most of the things I've found are equation solvers that are better than the eval() function (ie fastmath), but not finding anything that will reduce a string into a simpler equation. Anybody know of some code to do this?
Jason
-
Jul 27th, 2004, 08:58 PM
#6
Lively Member
This is sort of not pertinent, but, just to keep things straight... You posted:
For example, I have one eqn like, (3 X1+ 4X2 +5) /5 + (3 X1-7 X2 - 6)/6 = 2
it should give 23 X1 - 11 X2 -60 =0
Actually, the coefficient of X1 is 33, not 23. Perhaps a slip of the typing fingers?
-
Jul 27th, 2004, 11:28 PM
#7
Conquistador
that's not really relevant.
the equation illustrated his point, regardless of whether it was correct or not :P
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|