# Simplify a eq

This topic is 5023 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello I have this eq: (a*b)+(c*d)=x But I want to simply so it would look like this (a+b)*e=x and e should ONLY be described by b and d and (a+b) if it is needed. Ive tried a lot to find out a way but I can't is it impossible? If it isnt please show me how e is calculated! Thanks in advance

##### Share on other sites
im not sure how you plan to get the same result wile elemnating (c*d)
could you tell us what this formular does

##### Share on other sites
You would have

i)  ab + cd = xii) (a+b)e  = x->  ab + cd = (a+b)e->  e = (ab+cd)/(a+b)

##### Share on other sites
I want to optimize code look at this:
it is my problem but easier written

int finaldata[1000];

const int data[MAX][1000]; //
const int datamul[MAX];

// 2 can be any number but since I wrote (a*b)+(c*d)
// I write 2 here too.
for (int n = 0; n < 2; n++)
{
for (int m = 0; m < 1000; m++)
finaldata += data[n][m] * datamul[n];
}

// Intead I want to do this:
for (int n = 0; n < 2; n++)
{
for (int m = 0; m < 1000; m++)
finaldata += data[n][m];
}

for (m = 0; m < 1000; m++)
{
finaldata *= (This is the value I want, but cant find out how to calculate it)
}

// I am not programming for computer so plz dont tell me that it wont be much speed improvement

##### Share on other sites
As I see it, it can't be done in any meaningful way. blizzard999's is the only solution, and won't help you "optimize".

##### Share on other sites
blizzard999's whats that?

##### Share on other sites
Aha I didnt see it cause it came when I wrote my second post=)

1. 1
2. 2
3. 3
Rutin
22
4. 4
5. 5

• 13
• 19
• 14
• 9
• 9
• ### Forum Statistics

• Total Topics
632930
• Total Posts
3009289
• ### Who's Online (See full list)

There are no registered users currently online

×