[PATCH] D143074: [LangRef] improve documentation of SNaN in the default FP environment

Mak Nazečić-Andrlon via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 3 12:41:44 PST 2023


Muon added a comment.

The way it goes in IEEE 754 is that infinities and NaNs are only generated by exceptions. So when you compute 1/0, that signals the divide by zero exception, and default exception handling for that is to return the infinity of appropriate sign and raise the divide by zero status flag. Similarly, 0/0, inf/inf, inf - inf, and operations on an sNaN (other than bitwise ops like negate, abs, and copysign) all signal invalid operation, for which the default handling is to return a qNaN and raise the invalid operation flag.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143074/new/

https://reviews.llvm.org/D143074



More information about the llvm-commits mailing list