Add optional precision parameter to str() functions for floating point values.

The precision parameter allows setting the number of digits after the comma.
Put function value with 3-digit precision in console/logger.
Correct mc() method for the special case that the second and/or third Gaussian are zero.