def write_float(data):
   """Writes a formatted string from a float.

   Floats are printed out in exponential format, to 8 decimal places and 
   filling up any spaces under 16 not used with spaces.

   For example 1.0 --> '  1.00000000e+00'

   Args:
      data: The value to be read in.

   Returns:
      A formatted string.
   """

   return "%16.8e" % (data)