Is this correct?
Generating a vector: O(constant)
Sum the vector elements: O(n) or exactly (n-1)
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