What is the complexity (in flops, floating-point operations) of taking the $l_2$-norm of vector $\mathbf{v}\in\mathbb{R}^n$ (or $\mathbf{v}\in\mathbb{C}^n$ if a difference exists).
We have the following definition of the $l_2$-norm of $\mathbf{v}$:
$$ \lVert\mathbf{v}\rVert_2= \sqrt{|v_1|^2+\dots+|v_n|^2} $$
where $|v_i|$ is the absolute value of $v_i$ (or complex modulus if $v_i$ complex).
I guess that what bothers me the most is the square-root computation. I found that the square-root is considered one flop, and hence the complexity is $2n$ flops.
Isn't that wrong since the square-root should take more time to compute?