I have seen this many times. Note that six places isn't enough,
if the result is negative in the seventh place.
When the standard deviation is zero, or very close to zero
it is possible for rounding in the variance to give a
negative result. Probably better to set it to zero
instead of the sqrt() of the absolute value, but it will be
very small in any case.
The popular standard deviation algorithm uses an identity that is
true mathematically, but not always numerically. That is, the
mean of the squares minus the square of the mean should be positive
but with some types of rounding, it isn't.