Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8019603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:26:10+00:00 2026-06-04T21:26:10+00:00

I’m going to use this picture as a reference, so take a look at

  • 0

I’m going to use this picture as a reference, so take a look at it, it’s just a simple summation equation without any inputs. http://ww2.tnstate.edu/ganter/BIO311-Ch11-Eq2a.gif

Let’s say I had a simple javascript for loop

for( i=0; i<2 ; i++) {
//do
}
else {
//etc

Now, for loops seem to me to be little bit similar to summation equations.

So if the i=0 is the “initialization”, the i<2 is the “condition”, and the i++ is the “increment”. Could the initialization be compared to the “i=1”, the “condition” compared to the “I”, the “n1” compared to the “increment”, and the n* (f(x)) compared to the “do”?

What would be the appropriate analogies, if any, to these two function types?

* Please feel free to migrate this question to the appropriate forum but I figured I’d first pass it to the real programming forum because I’m talking about for-loops.

EDIT: I think I’m definitely right aboute “initialization” and the “condition”, those are obvious enough. But the rest of it…I’m just not sure about. Maybe the i++ is more like the n*/f(x). I don’t know.

EDIT2: I don’t know whose answer to grant as “correct”…is anybody below explicitly wrong in any way? I’m going to leave this open, please vote on the answer you think is the best. If you can’t decide, like me, vote for all of them and/or give your own answer

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T21:26:12+00:00Added an answer on June 4, 2026 at 9:26 pm

    You can say i = 0 is the initialization, and i < 2 specifies the end point of the range. i++ is the implicit increment that the summation operation assumes.

    Note that not all of mathematical notations are conveniently translatable to code as in the example you gave. Sometimes, you can specify infinity as the end point of the range in mathematics, but you won’t write something like that in code (usually, you will check the difference between iteration and stop when the difference is smaller than a threshold). Sometimes, you can even specify condition of the variable in mathematics (let’s say we only want to sum up those with index divisible to 3), but you won’t be able to specify something like that in javascript.

    If you are looking to write code that are close to mathematics, you can have a look at Haskell.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
this is what i have right now Drawing an RSS feed into the php,
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have this code to decode numeric html entities to the UTF8 equivalent character.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.