aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gleam/float.gleam17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gleam/float.gleam b/src/gleam/float.gleam
index 6aeeac7..8d42738 100644
--- a/src/gleam/float.gleam
+++ b/src/gleam/float.gleam
@@ -1,4 +1,21 @@
//// Functions for working with floats.
+////
+//// ## Float representation
+////
+//// Floats are represented as 64 bit floating point numbers on both the Erlang
+//// and JavaScript runtimes. The floating point behaviour is native to their
+//// respective runtimes, so their exact behaviour will be slightly different on
+//// the two runtimes.
+////
+//// ### Infinity and NaN
+////
+//// Under the JavaScript runtime, exceeding the maximum (or minimum)
+//// representable value for a floating point value will result in Infinity (or
+//// -Infinity). Should you try to divide two infinities you will get NaN as a
+//// result.
+////
+//// When running on BEAM, exceeding the maximum (or minimum) representable
+//// value for a floating point value will raise an error.
////
//// ## Division by zero
////