Jump to content
  • Advertisement
Sign in to follow this  
ProblemBaby

Simplify a eq

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

If you intended to correct an error in the post then please contact us.

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 this post


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

Share this post


Link to post
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 this post


Link to post
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 this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!