docs: protected static final long doubleToS390LongBits(double ieeeDouble) throws IOException {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "doubleToS390LongBits", ieeeDouble);
  
      // Get the bit pattern
      long ieeeLongBits = Double.doubleToLongBits(ieeeDouble);
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "IEEE double bit pattern= " + Long.toString(ieeeLongBits, 16));
  
      // Test the sign bit (0 = positive, 1 = negative)
      boolean positive = ((ieeeLongBits & DOUBLE_SIGN_MASK) == 0);
  
      // Deal with zero straight away...
      if ((ieeeLongBits & 0x7fffffffffffffffL) == 0) {
        // + or - 0.0
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "zero");
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "doubleToS390LongBits", ieeeLongBits);
        return ieeeLongBits;
      }
  
      // Extract the exponent
      long exponent = ieeeLongBits & DOUBLE_EXPONENT_MASK;
      // shift right 52 bits to get exponent in least significant byte
      exponent = exponent >>> 52;
      // subtract the bias to get the true value
      exponent = exponent - DOUBLE_BIAS;
  
      // Extract the mantissa
      long mantissa = ieeeLongBits & DOUBLE_MANTISSA_MASK;
  
      // Now begin the conversion to S390
  
      long remainder = Math.abs(exponent) % 4;
      long quotient = Math.abs(exponent) / 4;
  
      long s390Exponent = quotient;
      if ((exponent > 0) && (remainder != 0)) {
        s390Exponent = s390Exponent + 1;
      }
  
      // put the sign back in
      if (exponent < 0) {
        s390Exponent = -s390Exponent;
      }
  
      // Add the bias
      s390Exponent += S390_DOUBLE_BIAS;
  
      // Now adjust the mantissa part
      long s390Mantissa = mantissa;
      // for an exponent greater than -DOUBLE_BIAS, add in the implicit bit
      if (exponent > (-DOUBLE_BIAS)) {
        s390Mantissa = s390Mantissa | DOUBLE_MANTISSA_MSB_MASK;
      }
      else {
        // there is no implicit bit, so the mantissa is one bit to the right of what
        // we would normally expect.  We need to fix this for S390
        s390Mantissa = s390Mantissa << 1;
      }
  
      // S390 Mantissa starts 4 bits left of ieee one. The first of these is implied in
      // IEEE so only shift 3 places
      s390Mantissa = s390Mantissa << 3;
  
      if (remainder > 0) {
        if (exponent > 0) {
          // the next two lines perform the (m.2^(r-4)) part of the conversion
          int shift_places = (int) (4 - remainder);
          s390Mantissa = s390Mantissa >>> shift_places;
        }
        else {
          // to avoid loss of precision when the exponent is at a minimum,
          // we may need to shift the mantissa four places left and decrease the
          // s390 exponent by one before shifting right
          if ((exponent == - (DOUBLE_BIAS)) && ((s390Mantissa & 0x00f0000000000000L) == 0)) {
            s390Mantissa = s390Mantissa << 4;
            s390Exponent = s390Exponent - 1;
          }
          // the next two lines perform the m.2-r part of the conversion
          s390Mantissa = s390Mantissa >>> remainder;
        }
      }
  
      // An exponent of -DOUBLE_BIAS is the smallest that IEEE can do.  S390 has
      // a wider range, and hence may be able to normalise the mantissa more than
      // is possible for IEEE
      // Each shift left of four bits is equivalent to multiplying by 16,
      // so the exponent must be reduced by 1
      if (exponent == - (DOUBLE_BIAS)) {
        while ((s390Mantissa != 0) && ((s390Mantissa & 0x00f0000000000000L) == 0)) {
          s390Mantissa = s390Mantissa << 4;
          s390Exponent = s390Exponent - 1;
        }
      }
  
      // if the exponent is now > 127, we have an overflow since IEEE can handle larger numbers
      // than S390 can.
      if (s390Exponent > 127) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "Exponent = " + s390Exponent);
        throw new IOException("Number outside of range for double precision S/390 Float");
      }
      else if (s390Exponent < 0) {
        // the number is too small to represent, set it to zero
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "Number too small to represent, rounding to zero");
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "doubleToS390LongBits", 0L);
        return 0L;
      }
  
      // Assemble the s390BitPattern
      long s390Double = 0L;
      long s390ExponentBits = s390Exponent & 0x000000000000007FL;
      // make sure we only deal with 7 bits
      // add the exponent
      s390Double = s390ExponentBits << 56; // shift to MSB
      // add the sign
      if (!positive) {
        s390Double = s390Double | DOUBLE_SIGN_MASK;
      }
      // add the mantissa
      s390Double = s390Double | s390Mantissa;
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "S390 bit pattern = " + Long.toString(s390Double, 16));
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "doubleToS390LongBits",  s390Double);
      return s390Double;
    }