Jump to content

Summation notation


DarkWater

Recommended Posts

Well yeah... What I wrote is just oversimplified example. I have a feeling there might much more to it than just simple for() loop.

 

For example, what would be the format of $nExpression ?

 

Would it be like

 

$nExpression = "(1+(1/%N%))";

 

and then replace "%N%" with $i, parse and iterate?

Link to comment
Share on other sites

See, that's the problem.  It would use eval() like 4327908432190 times, lol.  That was an exaggeration.  Like, there are certain rules with summation notation to "simplify" things, like if you had:

 

sigma1ov9.png

 

You could really simplify it to:

 

sigma2jx0.png

 

And stuff like that makes it hard to get this to work. xD

 

Link to comment
Share on other sites

It really depends on the scope of the problems you're trying to solve. Obviously the advantage of a computer is that it is often acceptable to repeat the calculation many times, negating the need to find a way of simplifying the expression. On the other hand, it shouldn't be too hard to come up with something to simplify an expression given a relatively small size of potential expressions to solve.

Link to comment
Share on other sites

I am just developing a text based game for the learning experience during my free time. But I gave up on that piece of math and just created a table with all the number input>>outputs. made things so much more simple. This was only an option because they can't use a number higher than 100.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.