From 986d32a62b20c32338dac4dfd27c141c8f9be0fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Mon, 20 Jun 2016 13:25:04 +0200 Subject: Implement the new ceil/1 and floor/1 guard BIFs Implement as ceil/1 and floor/1 as new guard BIFs (essentially part of Erlang language). They are guard BIFs because trunc/1 is a guard BIF. It would be strange to have trunc/1 as a part of the language, but not ceil/1 and floor/1. --- erts/doc/src/erlang.xml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index d0a3a77e43..18a7a5b777 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -717,6 +717,19 @@ Z = erlang:adler32_combine(X,Y,iolist_size(Data2)). + + + Returns the smallest integer not less than the argument + +

Returns the smallest integer not less than + Number. + For example:

+
+> ceil(5.5).
+6
+

Allowed in guard tests.

+
+
Check if a module has old code. @@ -1464,6 +1477,20 @@ true + + + Returns the largest integer not greater than the argument + +

Returns the largest integer not greater than + Number. + For example:

+
+> floor(-10.5).
+-11
+

Allowed in guard tests.

+
+
+ Information about a fun. -- cgit v1.2.3