Results 1 to 2 of 2

Math Help - Floating point operations

  1. #1
    Newbie
    Joined
    Feb 2010
    Posts
    2

    Question Floating point operations

    How many floating point operations are needed to generate a vector using a for-loop:

    for ("0 to n")
    v = element(i+1)

    each element in the vector is : 1/(i^2)

    Also, how many floating point ops are needed to sum all the elements in a vector using a for loop?

    looks something like:

    for(0 to n)
    sum = sum+i
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Newbie
    Joined
    Feb 2010
    Posts
    2
    Is this correct?

    Generating a vector: O(constant)
    Sum the vector elements: O(n) or exactly (n-1)
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. help with floating point error
    Posted in the Math Topics Forum
    Replies: 0
    Last Post: October 17th 2011, 08:27 PM
  2. Floating Point Format
    Posted in the Advanced Math Topics Forum
    Replies: 5
    Last Post: December 13th 2010, 07:27 PM
  3. floating point representation
    Posted in the Calculus Forum
    Replies: 2
    Last Post: April 28th 2010, 02:40 AM
  4. Floating Point Representation
    Posted in the Discrete Math Forum
    Replies: 0
    Last Post: March 29th 2010, 02:40 AM
  5. Floating Point Notation
    Posted in the Number Theory Forum
    Replies: 2
    Last Post: July 4th 2007, 11:15 AM

Search Tags


/mathhelpforum @mathhelpforum