From fbf6bbca5260af6f5fa962951763a364d7d38f34 Mon Sep 17 00:00:00 2001 From: Rebecca Schlussel Date: Fri, 31 May 2024 11:33:17 -0400 Subject: [PATCH] Add documentation for handling of NaNs --- presto-docs/src/main/sphinx/language/types.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/presto-docs/src/main/sphinx/language/types.rst b/presto-docs/src/main/sphinx/language/types.rst index 4fb056e2c78af..573858298dd60 100644 --- a/presto-docs/src/main/sphinx/language/types.rst +++ b/presto-docs/src/main/sphinx/language/types.rst @@ -65,12 +65,22 @@ Floating-Point A real is a 32-bit inexact, variable-precision implementing the IEEE Standard 754 for Binary Floating-Point Arithmetic. +Presto strays from the IEEE standard when handling NaNs. +In Presto, NaN is considered larger than any other value for +all comparison and sorting operations. Additionally, NaN=NaN will +be true for all equality and distinctness purposes. + ``DOUBLE`` ^^^^^^^^^^ A double is a 64-bit inexact, variable-precision implementing the IEEE Standard 754 for Binary Floating-Point Arithmetic. +Presto strays from the IEEE standard when handling NaNs. +In Presto, NaN is considered larger than any other value for +all comparison and sorting operations. Additionally, NaN=NaN will +be true for all equality and distinctness purposes. + Fixed-Precision ---------------