From 8544c4099ca8747486410f33cb1cb0c06ba2f684 Mon Sep 17 00:00:00 2001 From: Simon Johansson Date: Mon, 29 Jan 2024 08:26:04 +0100 Subject: Explain runtime differences for floats --- src/content/chapter0_basics/lesson05_floats/code.gleam | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/content/chapter0_basics/lesson05_floats/code.gleam') diff --git a/src/content/chapter0_basics/lesson05_floats/code.gleam b/src/content/chapter0_basics/lesson05_floats/code.gleam index 8c4e89a..4241ab4 100644 --- a/src/content/chapter0_basics/lesson05_floats/code.gleam +++ b/src/content/chapter0_basics/lesson05_floats/code.gleam @@ -18,6 +18,9 @@ pub fn main() { io.debug(1.1 == 1.1) io.debug(2.1 == 1.2) + // Division by zero is not an error + io.debug(3.14 /. 0.0) + // Standard library float functions io.debug(float.max(2.0, 9.5)) io.debug(float.ceiling(5.4)) -- cgit v1.2.3