--- src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/dpml_ux_sqrt.c.orig 2023-06-16 20:55:56.000000000 +0800 +++ src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/dpml_ux_sqrt.c 2024-04-10 09:45:38.000000000 +0800 @@ -101,15 +101,15 @@ exponent = (exponent + exponent_parity) >> 1; shift = (BITS_PER_UX_FRACTION_DIGIT_TYPE + exponent_parity - S_PRECISION); - +/* # if (NUM_UX_FRACTION_DIGITS == 2) - +*/ lsd = ((msd << (BITS_PER_UX_FRACTION_DIGIT_TYPE - shift)) | (lsd >> shift)) >> (BITS_PER_UX_FRACTION_DIGIT_TYPE - D_PRECISION); f_lo = (double) lsd; - -# else /* this code is *WRONG* */ +/* +# else // this code is *WRONG* u.D_UNSIGNED_LO_WORD = (msd << (BITS_PER_WORD - D_EXP_WIDTH - 1) | @@ -124,6 +124,7 @@ f_lo = ((double) msd)*D_TWO_POW_32 + (double) lsd; #endif +*/ f = u.f; /* This is actually f' at this point */ f_hi = ((double) (msd >> shift)) * D_RECIP_TWO_POW_24; @@ -220,21 +221,21 @@ */ msd = (UX_FRACTION_DIGIT_TYPE) (D_TWO_POW_24*g); - +/* # if NUM_UX_FRACTION_DIGITS == 2 - +*/ signed_digit = (UX_SIGNED_FRACTION_DIGIT_TYPE) (D_TWO_POW_75*g_lo); msd = (msd << 39) + (signed_digit >> 12) + ((signed_digit >> 11) & 1); tmp_digit = (msd & SET_BIT(62)) ? (UX_MSB - 1) : ((UX_FRACTION_DIGIT_TYPE) -1); msd = ((UX_SIGNED_FRACTION_DIGIT_TYPE) msd < 0) ? msd : tmp_digit; - +/* # else # error "Sqrt not NYI for 32 bit integers" # endif - +*/ /* ** Get the current approximation, s, into unpacked format and compute ** 3 - x*s^2