From 178636916044eab9b8e7d63f1602acb568afc115 Mon Sep 17 00:00:00 2001 From: edgeone89 <29297226+edgeone89@users.noreply.github.com> Date: Fri, 22 Jan 2021 13:54:45 +0400 Subject: [PATCH] Update casts.md casting inf and -inf to integer --- src/casts.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/casts.md b/src/casts.md index 014c100..3fc5d19 100644 --- a/src/casts.md +++ b/src/casts.md @@ -56,6 +56,8 @@ For numeric casts, there are quite a few cases to consider: * floats that are too big turn into the largest possible integer * floats that are too small produce the smallest possible integer * NaN produces zero + * inf produces largest possible integer + * -inf produces smallest possible integer * casting from an integer to float will produce the floating point representation of the integer, rounded if necessary (rounding to nearest, ties to even)