IBM Z and LinuxONE Languages

 View Only

 Is there a mechanism in PL/I to generate a Quiet NaN (QNaN) for IEEE floating-pt.

Dave Rivers's profile image
Dave Rivers posted 12/22/25 10:38 AM

Is there a way to generate a QNaN in IBM PL/I?   This is usually accomplished by dividing (0.0 / 0.0),but that results in an INVALIDOP condition in PL/I (either at compile-time or run-time.)

I see the general testing builtins (ISNAN, ISFINITE, ISNORMAL, etc..) but can't find an easy way to generate a QNaN (quiet NaN) directly in PL/I without doing byte-order specific bit-twiddling in UNIONs.

   - Thanks -

   - Dave Rivers -