
  -spec float_to_list(Float, Options) -> string()
                         when
                             Float :: float(),
                             Options :: [Option],
                             Option ::
                                 {decimals, Decimals :: 0..253} |
                                 {scientific, Decimals :: 0..249} |
                                 compact | short.

Since:
  OTP R16B

  Returns a string corresponding to the text representation of 
  Float using fixed decimal point formatting.

  Available options:

   • If option decimals is specified, the returned value
     contains at most Decimals number of digits past the
     decimal point. If the number does not fit in the internal
     static buffer of 256 bytes, the function throws badarg.

   • If option compact is specified, the trailing zeros at the
     end of the list are truncated. This option is only
     meaningful together with option decimals.

   • If option scientific is specified, the float is formatted
     using scientific notation with Decimals digits of
     precision.

   • If option short is specified, the float is formatted with
     the smallest number of digits that still guarantees that F
     =:= list_to_float(float_to_list(F, [short])). When the
     float is inside the range (-2⁵³, 2⁵³), the notation that
     yields the smallest number of characters is used (scientific
     notation or normal decimal notation). Floats outside the
     range (-2⁵³, 2⁵³) are always formatted using scientific
     notation to avoid confusing results when doing arithmetic
     operations.

   • If Options is [], the function behaves as 
     float_to_list/1.

  Examples:

    > float_to_list(7.12, [{decimals, 4}]).
    "7.1200"
    > float_to_list(7.12, [{decimals, 4}, compact]).
    "7.12"
    > float_to_list(7.12, [{scientific, 3}]).
    "7.120e+00"
    > float_to_list(7.12, [short]).
    "7.12"
    > float_to_list(0.1+0.2, [short]).
    "0.30000000000000004"
    > float_to_list(0.1+0.2)
    "3.00000000000000044409e-01"

  In the last example, float_to_list(0.1+0.2) evaluates to 
  "3.00000000000000044409e-01". The reason for this is explained in 
  Representation of Floating Point Numbers.
