Fixed bugs: stdev as 1/sqrt(precision) rather than 1/precision [oops!].