summaryrefslogtreecommitdiff
path: root/lib/stdlib/test/shell_docs_SUITE_data/unknown_erlang_float_to_binary_2_func.txt
blob: b7a690fee918115419b2e8e61b34f7673ea0fcf8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

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

Since:
  OTP R16B

  Returns a binary corresponding to the text representation of 
  Float using fixed decimal point formatting. Options behaves in
  the same way as float_to_list/2. Examples:

    > float_to_binary(7.12, [{decimals, 4}]).
    <<"7.1200">>
    > float_to_binary(7.12, [{decimals, 4}, compact]).
    <<"7.12">>
    > float_to_binary(7.12, [{scientific, 3}]).
    <<"7.120e+00">>