You have to be careful. There are several ways to compute standard deviation that would give the same answer if floating point arithmetic were perfect. They're all accurate for some data sets, but some are far better than others under some circumstances.
The method I've seen proposed here is the one that is most likely to give bad answers. I used it myself until it crashed on me.
See Comparing three methods of computing standard deviation.