def __myfloat(x):
  """
  Private method that returns 0.0 if a string cannot be converted to float, or
  the result of the float() call
  """
  try:
    y=float(x)
  except ValueError:
    y=0.0
  return y