def try_anafas_float(floatstr):
  """
  Try converting a string into a float. Trims empty space and checks whether
  there is a decimal separator. When a decimal separator is unspecified, assumes
  two decimals separators by default (Anafas' default) dividing the resulting
  number by 100.
  """
  try:
    num = float(floatstr.strip())

    # checks if the decimal separator was omitted
    thereIsDot = not (floatstr.find(".") == -1)
    if not thereIsDot:
      num = num / 100.0

  except ValueError:
    num = 0.0

  return num