{
unsigned long image, sig, exp;
unsigned long sign = r->sign;
- bool denormal = (r->sig[SIGSZ-1] & SIG_MSB) == 0;
+ bool denormal = real_isdenormal (r);
image = sign << 31;
sig = (r->sig[SIGSZ-1] >> (HOST_BITS_PER_LONG - 24)) & 0x7fffff;
{
unsigned long image_lo, image_hi, sig_lo, sig_hi, exp;
unsigned long sign = r->sign;
- bool denormal = (r->sig[SIGSZ-1] & SIG_MSB) == 0;
+ bool denormal = real_isdenormal (r);
image_hi = sign << 31;
image_lo = 0;
const REAL_VALUE_TYPE *r)
{
unsigned long image_hi, sig_hi, sig_lo;
- bool denormal = (r->sig[SIGSZ-1] & SIG_MSB) == 0;
+ bool denormal = real_isdenormal (r);
image_hi = r->sign << 15;
sig_hi = sig_lo = 0;
{
unsigned long image3, image2, image1, image0, exp;
unsigned long sign = r->sign;
- bool denormal = (r->sig[SIGSZ-1] & SIG_MSB) == 0;
+ bool denormal = real_isdenormal (r);
REAL_VALUE_TYPE u;
image3 = sign << 31;
{
unsigned long image, sig, exp;
unsigned long sign = r->sign;
- bool denormal = (r->sig[SIGSZ-1] & SIG_MSB) == 0;
+ bool denormal = real_isdenormal (r);
image = sign << 15;
sig = (r->sig[SIGSZ-1] >> (HOST_BITS_PER_LONG - 11)) & 0x3ff;
{
unsigned long image, sig, exp;
unsigned long sign = r->sign;
- bool denormal = (r->sig[SIGSZ-1] & SIG_MSB) == 0;
+ bool denormal = real_isdenormal (r);
image = sign << 15;
sig = (r->sig[SIGSZ-1] >> (HOST_BITS_PER_LONG - 8)) & 0x7f;
/* Determine whether a floating-point value X is a signaling NaN. */
extern bool real_issignaling_nan (const REAL_VALUE_TYPE *);
+/* Determine whether a floating-point value X is a denormal. */
+inline bool
+real_isdenormal (const REAL_VALUE_TYPE *r)
+{
+ return (r->sig[SIGSZ-1] & SIG_MSB) == 0;
+}
+
/* Determine whether a floating-point value X is finite. */
extern bool real_isfinite (const REAL_VALUE_TYPE *);