Sigma??
As I get deeper into programming, the math tends to get a lot harder. I have been able to look up stuff on the internet and through books figure out what some formulas mean. Although there is one sign I do not understand. It is Sigma. If that is not the correct name, I am talking about the greek-looking E. I am only in grade 10, so I have not yet learn''t it. If somone could post how it is used, why, and some practical uses, it would be greatly appreciated.
Σ indicates that a sequence of numbers should be added, like this:
5
Σ n = 1 + 2 + 3 + 4 + 5 = 15
n=1
It can also be used when the number of terms is variable:
x
Σ n = 1 + 2 + ... + x = x(x + 1) / 2
n=1
Sometimes, it''s faster to use Σ notation than to write out the terms individually. I think that''s why it''s used
5
Σ n = 1 + 2 + 3 + 4 + 5 = 15
n=1
It can also be used when the number of terms is variable:
x
Σ n = 1 + 2 + ... + x = x(x + 1) / 2
n=1
Sometimes, it''s faster to use Σ notation than to write out the terms individually. I think that''s why it''s used

quote:
Sometimes, it''s faster to use Ó notation than to write out the terms individually. I think that''s why it''s used![]()
Especially when you have an infinite number of terms. It gets hard on the wrist

You really start to get into series and sequences in Pre-Cal and Calculus.
you can take the sigma as a for-loop..
where begin is the value under the sigma, end is the value above the sigma, and func is the math written on the right of the sigma..
"take a look around" - limp bizkit
www.google.com
float sigma_sum(int begin,int end,float (*func)(float)) { float sigma_result = 0.f; for(int x = begin; x < end; ++x) { sigma_result += func((float)x); }}
where begin is the value under the sigma, end is the value above the sigma, and func is the math written on the right of the sigma..
"take a look around" - limp bizkit
www.google.com
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia
My Page davepermen.net | My Music on Bandcamp and on Soundcloud
The loop''s termination condition is incorrect; you''re supposed to include the last number as well.

September 24, 2002 07:55 PM
I was also wondering how this worked for quite some time. That helps a lot! However, the second part you posted...
is giving me some trouble figuring out. Could you be a bit more specific in explaining what the
n = 1 + 2 + ... + x = x(x + 1) / 2
means?
Thanks
quote:
Original post by Beer Hunter
<tt> x
Ó n = 1 + 2 + ... + x = x(x + 1) / 2
n=1</tt>
is giving me some trouble figuring out. Could you be a bit more specific in explaining what the
n = 1 + 2 + ... + x = x(x + 1) / 2
means?
Thanks
quote:
Original post by davepermen
you can take the sigma as a for-loop..
True, however there are more efficient ways of handling sigma than a loop. You can get most down to a non-recursive expression (which you''d most likely learn next year in pre-calc). The Anonymous Poster gave an example of this with x(x + 1) / 2.
Not only would it make your code more efficient, it would also make is possible to get an exact solution to an infinately recursing function that would be impossible to complete when literally performed recursively with a for loop.
AP - The Σ, the stuff above and below it, and the n all go together before the =. If it helps, you can put brackets around them, like in this bad ascii art:
It''s saying that the sum of {1, 2, 3, ..., x} is equal to x(x+1)/2. Although I didn''t give the proof, it''s fairly well-known.
_ _| x || Σ n | = 1 + 2 + 3 + ... + x = x(x+1)/2| n=1 | ¯ ¯
It''s saying that the sum of {1, 2, 3, ..., x} is equal to x(x+1)/2. Although I didn''t give the proof, it''s fairly well-known.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement