aboutsummaryrefslogtreecommitdiffstats
path: root/erts/preloaded
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2013-01-23 17:03:41 +0100
committerBjörn-Egil Dahlberg <[email protected]>2013-01-23 17:03:41 +0100
commitd5bc1c71f756114d3110328d57e4f0545e144577 (patch)
tree11c95b7af28a060cffda5733d3043ffea707e798 /erts/preloaded
parent4c97cddddbe7c193953dbb58c342069330e3324c (diff)
parentab27e8699ef2a2bafe574158200993f184de3dc2 (diff)
downloadotp-d5bc1c71f756114d3110328d57e4f0545e144577.tar.gz
otp-d5bc1c71f756114d3110328d57e4f0545e144577.tar.bz2
otp-d5bc1c71f756114d3110328d57e4f0545e144577.zip
Merge branch 'sal/float_to_list_2/OTP-10752'
* sal/float_to_list_2/OTP-10752: Text representation of a float formatted using given options.
Diffstat (limited to 'erts/preloaded')
-rw-r--r--erts/preloaded/src/erlang.erl13
1 files changed, 12 insertions, 1 deletions
diff --git a/erts/preloaded/src/erlang.erl b/erts/preloaded/src/erlang.erl
index e966ac5296..50546b1856 100644
--- a/erts/preloaded/src/erlang.erl
+++ b/erts/preloaded/src/erlang.erl
@@ -84,7 +84,8 @@
-export([display_nl/0, display_string/1, dist_exit/3, erase/0, erase/1]).
-export([error/1, error/2, exit/1, exit/2, external_size/1]).
-export([external_size/2, finish_after_on_load/2, finish_loading/1, float/1]).
--export([float_to_list/1, fun_info/2, fun_to_list/1, function_exported/3]).
+-export([float_to_list/1, float_to_list/2]).
+-export([fun_info/2, fun_to_list/1, function_exported/3]).
-export([garbage_collect/0, garbage_collect/1]).
-export([garbage_collect_message_area/0, get/0, get/1, get_keys/1]).
-export([get_module_info/1, get_stacktrace/0, group_leader/0]).
@@ -711,6 +712,16 @@ float(_Number) ->
float_to_list(_Float) ->
erlang:nif_error(undefined).
+%% float_to_list/2
+-spec float_to_list(Float, Options) -> string() when
+ Float :: float(),
+ Options :: [Option],
+ Option :: {decimals, non_neg_integer()} |
+ {scientific, non_neg_integer()} |
+ compact.
+float_to_list(_Float, _Options) ->
+ erlang:nif_error(undefined).
+
%% fun_info/2
-spec erlang:fun_info(Fun, Item) -> {Item, Info} when
Fun :: function(),