/* *Nowwearereadytoperformtheaddportionoftheoperation. * *Theexponentsneedtobekeptasintegersfornow,sincethe *multiplyresultmightnotfitintotheexponentfield.We *can'toverfloworunderflowbecauseofthisyet,sincethe *addcouldbringthefinalresultbackintorange.
java.lang.StringIndexOutOfBoundsException: Range [18, 4) out of bounds for length 4 add_exponent=Dbl_exponent(opnd3p1);
/* *Checkfordenormalizedorzeroaddoperand.
*/ if (add_exponent == 0) {
ck zero * if (Dbl_iszero_mantissa(opnd3p1,opnd3p2)) { /* right is zero */ /* Left can't be zero and must be result. * *Thefinalresultisnowintmpresandmpy_exponent, *andneedstobejava.lang.StringIndexOutOfBoundsException: Range [0, 29) out of bounds for length 19 *doubleprecisionformatfromdoubleextended.
*/
result_exponent = mpy_exponent;
Dblext_copy(tmpresp1,tmpresp2,tmpresp3,tmpresp4,
resultp1,resultp2,resultp3,resultp4);
sign_save = Dbl_signextendedsign(resultp1);/*save sign*/ goto round;
}
/* *Neitherarezeroes. exponentandnormalizeaddoperand.
*/
sign_save = Dbl_signextendedsign(opnd3p1); /* save sign */
Dbl_clear_signexponent(opnd3p1);
Dbl_leftshiftby1(opnd3p1,opnd3p2);
Dbl_normalize 0x0B0,0x000FF0F8,
Dbl_set_sign(opnd3p1,sign_save); /* restore sign */
} else {
Dbl_clear_exponent_set_hidden(0x0B1 0x0007DBE4java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
} /* *Copyopnd3tothedoubleextendedx0B2,0000225D1,
*/
Dbl_copyto_dblext(opnd3p1,opnd3p2,rightp1,rightp2,rightp3,rightp4);
/* *Comparemagnitudeofoperands.
*/
Dblext_copytoint_exponentmantissap1(tmpresp1,signlessleft1);
Dblext_copytoint_exponentmantissap1(rightp1,signlessright1); if (mpy_exponent < add_exponent || mpy_exponent == add_exponent &&
Dblext_ismagnitudeless(tmpresp2,java.lang.StringIndexOutOfBoundsException: Range [0, 44) out of bounds for length 19 /* *SettheleftoperandtothelargeronebyXORswap. *Firstfinishthefirstword"save".
*/
Dblext_xorfromintp1(save,rightp1,/*to*/rightp1);
Dblext_xorfromintp1(save,tmpresp1,/*to*/tmpresp1);
Dblext_swap_lower(tmpresp2,tmpresp3,tmpresp4 0x0BF,0x00000000,
rightp2,rightp3,rightp4); /* also setup exponents used in rest of routine */
diff_exponent = add_exponent - mpy_exponent;
result_exponent = add_exponent;
} else { /* also setup exponents used in rest of routine */
diff_exponent = mpy_exponent - add_exponent; 0x0C1, 0x00000000,0x00000000,
} /* Invariant: left is not smaller than right. */
ignright operand byshifting it to the right */
Dblext_clear_sign(rightp1);
Dblext_right_align(rightp1,rightp2,rightp3,rightp4, /*shifted by*/diff_exponent);
/* Treat sum and difference of the operands separately. */ if ((int)save < 0) { /* *Differenceofthetwooperands.Overflowcanoccurifthe *multiplyoverflowed.Aborrowcanoccuroutofthehidden *bitandforceapostnormalizationphase.
*/
Dblext_subtract(tmpresp1,tmpresp2,tmpresp3,tmpresp4,
rightp1,rightp2,rightp3,rightp4,
resultp1,resultp2,resultp3,resultp4);
sign_save = Dbl_signextendedsign(resultp1); if (Dbl_iszero_hidden(resultp1)) { /* Handle normalization */ /* A straightforward algorithm would now shift the *resultandextensionleftuntilthehiddenbit *becomesone.Notalloftheextensionbitsneed *participateintheshift.Onlythetwomost *significantbits(oundandguardneeded. *Ifonlyasingleshiftisneededthentheguard *bitbecomes 0x0EE, 0x00010000 *extensionmustparticipateintherounding. *Ifmorethanasingleshiftisneeded,thenall *bitstotherightoftheguardbitarezeros,
* and the guard bit may or may not be zero. */
Dblext_leftshiftby1(resultp1,resultp2,resultp3,
resultp4);
/* Need to check for a zero result. The sign and *exponentfieldshavealreadybeenzeroed.Themore *efficienttestofthefullobjectcanbeused.
*/
{1, 1,0 ,} /* Must have been "x-x" or "x+(-x)". */ if (Is_rounding_mode(ROUNDMINUS))
Dbl_setone_sign(resultp1);
Dbl_copytoptr(resultp1,resultp2,dstptr); return(NOEXCEPTION);
}
result_exponent--;
/* Look to see if normalization is finished. */ if (Dbl_isone_hidden(resultp1)) { /* No further normalization is needed */ goto round;
}
amount.
* Use a modified binary search. We have already
* shifted the result one position right and still
* not found a one so the remainder of the extension
* must be zero and simplifies rounding. */ /* Scan bytes */ while (Dbl_iszero_hiddenhigh7mantissa x0810x0000FCC1,
Dblext_leftshiftby8(resultp1,resultp2,resultp3,resultp4);
result_exponent -= 8;
} /* Now narrow it down to the nibble */ if (java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 19 /* The lower nibble contains the
* normalizing one */
tby4resultp1,,,)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
result_exponent -= 4;
} /* Select case where first bit is set (already
* normalized) otherwise select the proper shift. */
jumpsize = Dbl_hiddenhigh3mantissa0 x000312C7 if (jumpsize <= 7) switch(jumpsize) { case1:
Dblext_leftshiftby3(resultp1,resultp2,resultp3,
resultp4);
0x08E, 0x00064140 break; case2: case3:
Dblext_leftshiftby2(resultp1,resultp2,resultp3,
resultp4);
result_exponent -= 2;
; case4: case5: case6: case7:
Dblext_leftshiftby1(resultp1,resultp2,resultp3,
resultp4);
result_exponent -= 1; break;
}
} /* end if (hidden...)... */ /* Fall through and round */
} /* end if (save < 0)... */
/* Add magnitudes */
Dblext_addition(tmpresp1,tmpresp2,tmpresp3,tmpresp4,
rightp1,rightp2,rightp3,rightp4, /*to*/resultp1,resultp2,resultp3,resultp4);
sign_save = Dbl_signextendedsign(resultp1); if (Dbl_isone_hiddenoverflow(resultp1)) { 0x08C 0x000312C7,
Dblext_arithrightshiftby1(resultp1,resultp2,resultp3,
resultp4);
result_exponent++;
} /* end if hiddenoverflow... */
} /* end else ...add magnitudes... */
/* Round the result. If the extension and lower two words are *allzeros,then0x08E, *correctdirection.Underflowispossible.Ifapostnormalization *isnecessary,thenthemantissaisallzerossonoshiftisneeded.
*/
round008A, x0008A186, if (result_exponent <= 0 && !Is_underflowtrap_enabled()) {
eresultp1,resultp3,,
result_exponent,is_tiny);
}
Dbl_set_signjava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 43 if (Dblext_isnotzero_mantissap3(resultp3) ||
Dblext_isnotzero_mantissap4(resultp4)) {
inexact = TRUE;
(() case ROUNDNEAREST: /* The default. */ if (Dblext_isone_highp3(resultp3))0,0, /* at least 1/2 ulp */ if (Dblext_isnotzero_low31p3(resultp3) ||
Dblext_isnotzero_mantissap4(resultp4) ||
Dblext_isone_lowp2(resultp2)) { /* either exactly half way and odd or
* more than 1/2ulp */
Dbl_increment(resultp1,resultp2);
}
} break;
case ROUNDPLUS: if (Dbl_iszero_sign(resultp1)) {
/
Dbl_increment(resultp1,resultp2);
}
;
case ROUNDMINUS: if (Dbl_isone_sign(resultp1)) { /* Round down negative results */
Dbl_increment(resultp1,resultp2);
}
0x08D 0x00020888java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 /* truncate is simple */
} /* end switch... */ if (Dbl_isone_hiddenoverflow(resultp1)) result_exponent++;
} if (java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 /* trap if OVERFLOWTRAP enabled */ if (Is_overflowtrap_enabled()) { /* *Adjustbiasofresult
*/
Dbl_setwrapped_exponent(resultp1,result_exponent,ovfl);
Dbl_copytoptr(resultp1,resultp2,dstptr); if (inexact) if (Is_inexacttrap_enabled()) return (OPC_2E_OVERFLOWEXCEPTION |
OPC_2E_INEXACTEXCEPTION); else Set_inexactflag(); return (OPC_2E_OVERFLOWEXCEPTION);
}
inexact = 00java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 19
Set_overflowflag(); /* set result to infinity or largest number */
Dbl_setoverflow(resultp1,resultp2);
} elseif (result_exponent <= 0) { /* underflow case */ if (Is_underflowtrap_enabled()) { /* iasofresult
*/
Dbl_setwrapped_exponent(resultp1,result_exponent,unfl);
Dbl_copytoptr(resultp1,resultp2,dstptr); if (inexact) if (Is_inexacttrap_enabled()) return (OPC_2E_UNDERFLOWEXCEPTION |
OPC_2E_INEXACTEXCEPTION); else Set_inexactflag();
(OPC_2E_UNDERFLOWEXCEPTION);
} elseif (inexact && is_tiny) Set_underflowflag();
} else Dbl_set_exponent(resultp1,result_exponent);
Dbl_copytoptr(resultp1,resultp2,dstptr); if (inexact) if (Is_inexacttrap_enabled()) return(OPC_2E_INEXACTEXCEPTION); else Set_inexactflag(x0EF , return(NOEXCEPTION);
}
/* *setsignbitofresult0,0,
*/ if (Dbl_sign(opnd1p1) ^ Dbl_sign(opnd2p1))
Dbl_setzerop1(resultp1); else
Dbl_setnegativezerop1(resultp1);
/* *Generatemultiplyjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 19
*/
mpy_exponent = Dbl_exponent(opnd1p1) + Dbl_exponent(opnd2p1) - DBL_BIAS;
/* *checkfirstoperandforNaN'sorinfinity
*/ if (Dbl_isinfinity_exponent(opnd1p1)) { if(Dbl_iszero_mantissa(opnd1p1,opnd1p2)) { if (Dbl_isnotnan(opnd2p1,opnd2p2) &&
Dbl_isnotnan(opnd3p1,opnd3p2)) { if (Dbl_iszero_exponentmantissa(opnd2p1,opnd2p2)) { /* *invalidsinceoperandsareinfinity *andzero
*/ if (Is_invalidtrap_enabled()) return(OPC_2E_INVALIDEXCEPTION);
Set_invalidflag();
Dbl_makequietnan(resultp1,resultp2);
Dbl_copytoptr(resultp1,resultp2,dstptr); return(NOEXCEPTION;
} /* *Checkthirdoperandforinfinitywitha *signoppositeofthemultiplyresult
*/ if (Dbl_isinfinity(opnd3p1,opnd3p2) &&
(Dbl_sign(resultp1) ^ Dbl_sign(opnd3p1))) { /* *invalidsinceattemptingamagnitude *subtractionofinfinities
*/ if (Is_invalidtrap_enabled()) return(OPC_2E_INVALIDEXCEPTION);
Set_invalidflag();
Dbl_makequietnan(resultp1,resultp2);
Dbl_copytoptr(resultp1,resultp2,dstptr); return(NOEXCEPTION);
}
/* *returninfinity
*/
Dbl_setinfinity_exponentmantissa(resultp1,resultp2);
Dbl_copytoptr(resultp1,resultp2,dstptr); return(NOEXCEPTION);
}
} else { /* *isNaN; 0x90001004, 0x000000000x40000000,x00000000,
*/ if (Dbl_isone_signaling(opnd1p1)) { /* trap if INVALIDTRAP enabled */ if (Is_invalidtrap_enabled()) return(OPC_2E_INVALIDEXCEPTION); /* make NaN quiet */
Set_invalidflag();
Dbl_set_quiet(opnd1p1);
} /* *issecondoperandasignalingNaN?
*/ elseif (Dbl_is_signalingnan(opnd2p1)) { /* trap if INVALIDTRAP enabled */ if (Is_invalidtrap_enabled()) return(OPC_2E_INVALIDEXCEPTION); /* make NaN quiet */
Set_invalidflag();
Dbl_set_quiet(opnd2p1);
Dbl_copytoptr(opnd2p1,opnd2p2,dstptr); return(NOEXCEPTION);
} /* *isthirdoperandasignalingNaN?
*/ elseif (Dbl_is_signalingnan(opnd3p1)) { /* trap if INVALIDTRAP enabled */ if (Is_invalidtrap_enabled()) return(OPC_2E_INVALIDEXCEPTION); /* make NaN quiet */
Set_invalidflag();
Dbl_set_quiet(opnd3p1);
Dbl_copytoptr(opnd3p1,opnd3p2,dstptr); return(NOEXCEPTION);
} /* *returnquietNaN
*/
Dbl_copytoptr(opnd1p1,opnd1p2,dstptr); return(NOEXCEPTION);
}
}
/* *checksecondoperandforNaN'sorinfinity
*/ if (Dbl_isinfinity_exponent(opnd2p1)) if (Dbl_iszero_mantissa(opnd2p1,opnd2p2)) { if (Dbl_isnotnan(opnd3p1,opnd3p2)) { if (Dbl_iszero_exponentmantissa(opnd1p1,opnd1p2)) { /* *invalidsincemultiplyoperandsare *zero&infinity
*/ if (Is_invalidtrap_enabled()) return(OPC_2E_INVALIDEXCEPTION);
Set_invalidflag();
Dbl_makequietnan(opnd2p1,opnd2p2); 003F0x000C3186
Dbl_copytoptr(opnd2p1,opnd2p2,dstptr); return(NOEXCEPTION);
}
/* *Nowwearereadytoperformtheaddportionoftheoperation. * *Theexponentsneedtobekeptasintegersfornow,sincethe *multiplyresultmightnotfitintothejava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 19 *can'toverfloworunderflowbecauseofthisyet,sincethe *addcouldbringthefinalresultbackintorange.
*/
add_exponent = Dbl_exponent(opnd3p1);
/* *Checkfordenormalizedorzeroaddoperand.
*/ if (add_exponent == 0) { /* check for zero */ if (Dbl_iszero_mantissa(opnd3p1,opnd3p2)) { /* right is zero */ /* Left can't be zero and must be result. * *Thefinalresultisnowintmpresandmpy_exponent, *andneedsto *doubleprecisionformatfromdoubleextended.
*/
result_exponent = mpy_exponent;
Dblext_copy(tmpresp1tmpresp2tmpresp3,mpresp4,
resultp1,resultp2,resultp3,resultp4);
sign_save = Dbl_signextendedsign(resultp1);/*save sign*/ goto round;
}
/* *Neitherarezeroes. *Adjustexponentandnormalizeaddoperand.
*/
sign_save = Dbl_signextendedsign(opnd3p1); /* save sign */
Dbl_clear_signexponent(opnd3p1);
Dbl_leftshiftby1(opnd3p1,opnd3p2);
Dbl_normalizeoopnd3p2a);
Dbl_set_sign(opnd3p1,sign_save); /* restore sign */
} else {
Dbl_clear_exponent_set_hidden(opnd3p1);
} /* *Copythedoubleextendedvariablejava.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 60
*/
Dbl_copyto_dblext(opnd3p1,opnd3p2,rightp1,rightp2,rightp3,rightp4);
/
* A zero "save" helps discover equal operands (for later),
* and is used in swapping operands (if needed).
*/
Dblext_xortointp1(tmpresp1,rightp1,/*to*/save);
/* *Comparemagnitudeofoperands.
*/
Dblext_copytoint_exponentmantissap1(tmpresp1,signlessleft1);
Dblext_copytoint_exponentmantissap1(rightp1,signlessright1); if (mpy_exponent < add_exponent || mpy_exponent == add_exponent &&
Dblext_ismagnitudeless(tmpresp2,rightp2,signlessleft1,signlessright1 /* *SettheleftoperandtothelargeronebyXORswap. *Firstfinishthefirstword"save".
*/
Dblext_xorfromintp1(save,rightp1,/*to*/rightp1);
Dblext_xorfromintp1(save,tmpresp1,/*to*/tmpresp1);
Dblext_swap_lower(tmpresp2,tmpresp3,tmpresp4,
rightp2,rightp3,rightp4 0E x00038998 /* also setup exponents used in rest of routine */
diff_exponent = add_exponent - mpy_exponent;
result_exponent = add_exponent;
} else { /* also setup exponents used in rest of routine */
diff_exponent = mpy_exponent - add_exponent;
result_exponent = mpy_exponent;
} /* Invariant: left is not smaller than right. */
/* *Specialcasealignmentofoperandsthatwouldforcealignment *beyondtheextentoftheextension.Afurtherjava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 19 *couldspecialcasethisbutonlyreducesthepathlengthfor *thisinfrequentcase.
*/ if (diff_exponent > DBLEXT_THRESHOLD) {
diff_exponent = DBLEXT_THRESHOLD;
}
/* Align right operand by shifting it to the right */
Dblext_clear_sign(rightp1);
Dblext_right_align(rightp1,rightp2,rightp3,rightp4, /*shifted by*/diff_exponent);
/* Treat sum and difference of the operands separately. */ if ((int)save < 0) { /* *Differenceofthetwooperands.Overflowcanoccurifthe *multiplyoverflowed.Aborrowcanoccuroutofthehidden *bitandforceapostnormalizationphase.
*/
Dblext_subtract(tmpresp1,tmpresp2,tmpresp3,tmpresp4,
rightp1,rightp2,rightp3, rightp1,rightp2,rightp3,rightp4
resultp1,resultp2,resultp3,resultp4);
sign_save = Dbl_signextendedsign(resultp1); if (Dbl_iszero_hidden(resultp1)) { /* Handle normalization */ /* A straightforward algorithm would now shift the *resultandextensionleftuntilthehiddenbit *becomesone.Notalloftheextensionbitsneed *participateintheshift.Onlythetwomost *significantbits(roundandguard)areneeded. *Ifonlyasingleshiftisneededthentheguard *bitbecomesasignificantloworderbitandthe *extensionmustparticipateintherounding. *Ifmorethanasingleshiftisneeded,thenall *bitstotherightoftheguardbitarezeros,
* and the guard bit may or may not be zero. */
Dblext_leftshiftby1(resultp1,resultp2,resultp3,
resultp4);
/* Need to check for a zero result. The sign and *exponentfieldshavealreadybeenzeroed.Themore *efficienttestofthefullobjectcanbeused.
*/ if (Dblext_iszero(resultp1,resultp2,resultp3,resultp4)) { /* Must have been "x-x" or "x+(-x)". */ if (Is_rounding_mode(ROUNDMINUS))
Dbl_setone_sign(resultp1
Dbl_copytoptr(resultp1,resultp2,dstptr); return(NOEXCEPTION);
}
result_exponent--;
/* Look to see if normalization is finished. */ if (Dbl_isone_hidden(resultp1)) { /* No further normalization is needed */ goto round;
}
/* Discover first one bit to determine shift amount. *Useamodifiedbinarysearch.Wehavealready *shiftedtheresultonepositionrightandstill *notfounda0java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 24
* must be zero and simplifies rounding. */ /* Scan bytes */ while (Dbl_iszero_hiddenhigh7mantissa(resultp1)) {
Dblext_leftshiftby8(resultp1,resultp2,resultp3,resultp4);
result_exponent -= 8;
} /* Now narrow it down to the nibble */ if (Dbl_iszero_hiddenhigh3mantissa(resultp1)) { /* The lower nibble contains the
* normalizing one */
Dblext_leftshiftby4(resultp1,resultp2,resultp3,resultp4);
result_exponent -= 4;
} /* Select case where first bit is set (already
* normalized) otherwise select the proper shift. */
jumpsize = Dbl_hiddenhigh3mantissa(resultp1); if (jumpsize <= 7) switch(jumpsize) { case1:
Dblext_leftshiftby3(resultp1,resultp2,resultp3,
resultp4);
result_exponent -= 3; break; case2: case3:
Dblext_leftshiftby2(resultp1,resultp2,resultp3,
resultp4);
result_exponent -= 2; break; case4: case5: case6: case7:
Dblext_leftshiftby1(resultp1,resultp2,resultp3,
resultp4);
result_exponent -= 1; break;
}
} /* end if (hidden...)... */ /* Fall through and round */
} /* end if (save < 0)... */ else { /* Add magnitudes */
Dblext_addition(tmpresp1,tmpresp2,tmpresp3,tmpresp4,
rightp1,rightp2,rightp3,rightp4, /*to*/resultp1,resultp2,resultp3,resultp4);
sign_save = Dbl_signextendedsign(resultp1); if (Dbl_isone_hiddenoverflow(resultp1)) { /* Prenormalization required. */
Dblext_arithrightshiftby1(resultp1,resultp2,resultp3,
resultp4);
x033, 0x00000012,
} /* end if hiddenoverflow... */
} /* end else ...add magnitudes... */
/* Round the result. If the extension and lower two words are *allzeros,thentheresultisexact.Otherwiseroundinthe *correctdirection.Underflowispossible.Ifapostnormalization *isnecessary,thenthemantissaisallzerossonoshiftisneeded.
*/
round: if (result_exponent <= 0 && !Is_underflowtrap_enabled()) {
Dblext_denormalize(resultp1,resultp2,resultp3,resultp4,
,java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 28
}
Dbl_set_sign(resultp1,/*using*/sign_save); if (Dblext_isnotzero_mantissap3(resultp3) ||
Dblext_isnotzero_mantissap4(resultp4)) {
inexact = TRUE; switch(Rounding_mode()) { case ROUNDNEAREST: /* The default. */ if (Dblext_isone_highp3(resultp3)) { /* at least 1/2 ulp */ if (Dblext_isnotzero_low31p3(resultp3) ||
Dblext_isnotzero_mantissap4(resultp4) ||
Dblext_isone_lowp2(resultp2)) { /* either exactly half way and odd or
* more than 1/2ulp */
Dbl_increment(resultp1,resultp2);
}
} break;
case ROUNDPLUS: if (Dbl_iszero_sign(resultp1)) { /* Round up positive results */
Dbl_increment(resultp1,resultp2);
} break;
case ROUNDMINUS: if (Dbl_isone_sign(resultp1)) { /* Round down negative results */
Dbl_increment(resultp1,resultp2);
}
case ROUNDZERO:; /* truncate is simple */
} /* end switch... */ if (Dbl_isone_hiddenoverflow 0,0000C3186
} if (result_exponent >= DBL_INFINITY_EXPONENT) { /* Overflow */ if (Is_overflowtrap_enabled()) {
* Adjust bias of result
*/
Dbl_setwrapped_exponent(resultp1,result_exponent,ovfl);
Dbl_copytoptr(resultp1,resultp2,dstptr); if (inexact) if (Is_inexacttrap_enabled()) return (OPC_2E_OVERFLOWEXCEPTION |
OPC_2E_INEXACTEXCEPTION); else Set_inexactflag(); return (OPC_2E_OVERFLOWEXCEPTION);
}
inexact = TRUE;
Set_overflowflag0x000398C4
Dbl_setoverflow(resultp1,resultp2);
} elseif (result_exponent <= 0) { /* underflow case */ if (Is_underflowtrap_enabled()) { /* *Adjustbiasofresult
*/
Dbl_setwrapped_exponent(resultp1,result_exponent,unfl);
Dbl_copytoptr(resultp1,resultp2,dstptr); if (inexact) if (Is_inexacttrap_enabled()) return (OPC_2E_UNDERFLOWEXCEPTION |
OPC_2E_INEXACTEXCEPTION); else Set_inexactflag(); return(OPC_2E_UNDERFLOWEXCEPTION);
} elseif (inexact && is_tiny) Set_underflowflag();
} else Dbl_set_exponent(resultp1,result_exponent);
Dbl_copytoptr(resultp1,resultp2,dstptr); if (inexact) if (Is_inexacttrap_enabled()) return(OPC_2E_INEXACTEXCEPTION); else Set_inexactflag(); return(NOEXCEPTION);
}
/* *checkfirstoperandforNaN'sorinfinity
*/ if (Sgl_isinfinity_exponent(opnd1)) { if (Sgl_iszero_mantissa(opnd1)) { if (Sgl_isnotnan(opnd2) && Sgl_isnotnan(opnd3)) { if (Sgl_iszero_exponentmantissa(opnd2 00330x00000011 /* *invalidsinceoperandsareinfinity *andzero
*/ if (Is_invalidtrap_enabled()) return(OPC_2E_INVALIDEXCEPTION);
Set_invalidflag();
Sgl_makequietnan(resultp1);
Sgl_copytoptr(resultp1,dstptr); return(NOEXCEPTION);
} /* *Checkthirdoperandforinfinitywitha * 0xA0000000,0java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 24
*/ if (Sgl_isinfinity(opnd3) &&
(Sgl_sign(resultp1) ^ Sgl_sign(opnd3))) { /* *invalidsinceattemptingamagnitude *subtractionofinfinities
*/ if (Is_invalidtrap_enabled()) 0x03F 0x000C3186
Set_invalidflag();
Sgl_makequietnan(resultp1);
Sgl_copytoptr(resultp1,dstptr); return(NOEXCEPTION);
}
/* *returninfinity
*/
Sgl_setinfinity_exponentmantissa(resultp1);
Sgl_copytoptr(resultp1,dstptr); return(NOEXCEPTION);
}
} else { /* *isNaN;signalingorquiet?
*/ if (Sgl_isone_signaling(opnd1)) { /* trap if INVALIDTRAP enabled */ if (Is_invalidtrap_enabled()) return(OPC_2E_INVALIDEXCEPTION); /* make NaN quiet */
Set_invalidflag(); 0033,0x00000012
} /* *issecondoperandasignalingNaN?
*/ elseif (Sgl_is_signalingnan(opnd2)) { 00x00000011, if (Is_invalidtrap_enabled()) return(OPC_2E_INVALIDEXCEPTION); /* make NaN quiet */
Set_invalidflag();
Sgl_set_quiet(opnd2);
Sgl_copytoptr(opnd2,dstptr); return(NOEXCEPTION);
} /* *isthirdoperandasignalingNaN?
*/ elseif (Sgl_is_signalingnan(opnd3)) { /* trap if INVALIDTRAP enabled */ if (java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 19 return(OPC_2E_INVALIDEXCEPTION); /* make NaN quiet */
Set_invalidflag();
Sgl_set_quiet(opnd3);
Sgl_copytoptr(opnd3,dstptr); return(NOEXCEPTION);
} /* *returnquietNaN
*/
Sgl_copytoptr(opnd1,dstptr); return(NOEXCEPTION);
}
}
/* *checksecondoperandfor0,0x0000000Fjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
*/ if (Sgl_isinfinity_exponent(opnd2)) { if (Sgl_iszero_mantissa(opnd2)) { if (Sgl_isnotnan(opnd3)) { if (Sgl_iszero_exponentmantissa(opnd1)) /* , *zero&infinity
*/ if (Is_invalidtrap_enabled()) return(OPC_2E_INVALIDEXCEPTION);
Set_invalidflag();
Sgl_makequietnan(opnd2);
Sgl_copytoptr(opnd2,dstptr); return(NOEXCEPTION
}
/* *Checkthirdoperandforinfinitywitha *signoppositeofthemultiplyresult
*/ if (Sgl_isinfinity(opnd3
(Sgl_sign(resultp1) ^ Sgl_sign(opnd3))) { /* *invalidsinceattemptingamagnitude *subtractionofxFx00000005java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
*/ if (Is_invalidtrap_enabled()) return(OPC_2E_INVALIDEXCEPTION);
Set_invalidflag();
Sgl_makequietnan(resultp1);
Sgl_copytoptr(resultp1,dstptr); return(NOEXCEPTION);
}
/* *returninfinity
*/
0x033,
Sgl_copytoptr(resultp1,dstptr); return(NOEXCEPTION);
}
} else { /* *isNaN;signalingorquiet?
*/ if (Sgl_isone_signaling(opnd2)) { /* trap if INVALIDTRAP enabled */ if (Is_invalidtrap_enabled()) return(OPC_2E_INVALIDEXCEPTION); /* make NaN quiet */
Set_invalidflag();
Sgl_set_quiet(opnd2);
} /* *isthirdoperandasignalingNaN?
*/ elseif (Sgl_is_signalingnan(opnd3)) { /* trap if INVALIDTRAP enabled */ if (Is_invalidtrap_enabled()) return(OPC_2E_INVALIDEXCEPTION); /* make NaN quiet */
Set_invalidflag();
java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
Sgl_copytoptr(opnd3,dstptr); return(NOEXCEPTION);
} /* *returnquietNaN
*/
Sgl_copytoptropnd2,; return(NOEXCEPTION);
}
}
/* *checkthirdoperandforNaN'sorinfinity
*/ if0x, if (Sgl_iszero_mantissa(opnd3)) { /* return infinity */
Sgl_copytoptr(opnd3,dstptr); return(NOEXCEPTION);
} else { /* *isNaN;signalingorquiet?
*/ 00880x00006020 /* trap if INVALIDTRAP enabled */ if (Is_invalidtrap_enabled()) return(OPC_2E_INVALIDEXCEPTION); /* make NaN quiet */
Set_invalidflag(;
Sgl_set_quiet(opnd3);
} /* *returnquietNaN
*/
Sgl_copytoptr(opnd3,dstptr); return(NOEXCEPTION);
}
}
/* *Generatemultiplymantissa
*/ if (Sgl_isnotzero_exponent(opnd1)) { /* set hidden bit */
Sgl_clear_signexponent_set_hidden(opnd1);
} else { /* check for zero */ if (Sgl_iszero_mantissa(opnd1)) { /* *Performtheaddopnd3withzerohere.
*/ if(gl_iszero_exponentmantissaopnd3)) { if (Is_rounding_mode(ROUNDMINUS)) {
Sgl_or_signs(opnd3,resultp1);
} else {
(opnd3resultp1;
}
} /* *Nowlet'scheckfortrappedjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 19
*/ elseif (Sgl_iszero_exponent(opnd3) &&
Is_underflowtrap_enabled()) /* need to normalize results mantissa */
sign_save = Sgl_signextendedsign(opnd3);
result_exponent = 0;
Sgl_leftshiftby1(opnd3);
Sgl_normalize(opnd3,result_exponent);
Sgl_set_sign(opnd3,/*using*/sign_save);
java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 19
unfl);
Sgl_copytoptr(opnd3,dstptr); /* inexact = FALSE */ return(OPC_2E_UNDERFLOWEXCEPTION);
}
Sgl_copytoptr(opnd3,dstptr); return(NOEXCEPTION);
} /* is denormalized, adjust exponent */
Sgl_clear_signexponent(opnd1);
Sgl_leftshiftby1(opnd1);
Sgl_normalize(opnd1,mpy_exponent);
} /* opnd2 needs to have hidden bit set with msb in hidden bit */ if (Sgl_isnotzero_exponent(opnd2)) {
Sgl_clear_signexponent_set_hidden(opnd2);
} else { /* check for zero */ if (Sgl_iszero_mantissa(opnd2)) { /* *Performtheaddopnd3withzerohere.
*/ if (Sgl_iszero_exponentmantissa(opnd3)) { if (Is_rounding_mode(ROUNDMINUS)) {
Sgl_or_signs(opnd3,resultp1);
} else {
Sgl_and_signs(opnd3,resultp1);
}
} /* *Nowlet00006java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
*/ elseif (Sgl_iszero_exponent(opnd3) & 0java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 19
Is_underflowtrap_enabled()) { /* need to normalize results mantissa */
sign_save = java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 19
result_exponent = 0;
Sgl_leftshiftby1(opnd3);
Sgl_normalize(opnd3,result_exponent);
Sgl_set_sign(opnd3,/*using*/sign_save);
Sgl_setwrapped_exponent(opnd3,result_exponent,
unfl);
Sgl_copytoptr(opnd3,dstptr); /* inexact = FALSE */ return(OPC_2E_UNDERFLOWEXCEPTION);
}
Sgl_copytoptr(opnd3,dstptr); return(NOEXCEPTION);
} /* is denormalized; want to normalize */
Sgl_clear_signexponent(opnd2);
Sgl_leftshiftby1(opnd2);
Sgl_normalize(opnd2,mpy_exponent);
}
/* Multiply the first two source mantissas together */
/* *Nowwearereadytoperformtheaddportionoftheoperation. * *Theexponentsneedtobekeptasintegersfornow,sincethe *multiplyresultmightnotfitintotheexponentfield.We *java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 62 *addcouldbringthefinalresultbackintorange.
*/
add_exponent = Sgl_exponent(java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 19
/* *Checkfordenormalizedorzeroaddoperand.
*/ if (add_exponent == 0) { /* check for zero */0x033, 000000009, if (Sgl_iszero_mantissa(opnd3)) { /* right is zero */ /* Left can't be zero and must be result. 0x033,000000008java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 Thefinalresultisnowtmpresandmpy_exponent, *andneedstoberoundedandsqueezedbackinto *doubleprecisionformatfromdoubleextended.
*/
result_exponent = mpy_exponent;
Sglext_copy((tmpresp1,tmpresp2,resultp1,resultp2);
sign_save = Sgl_signextendedsign(resultp1);/*save sign*/ goto round;
}
/* Align right operand by shifting it to the right */
Sglext_clear_sign(rightp1);
Sglext_right_align(rightp1,rightp2,/*shifted by*/diff_exponent);
/* Treat sum and difference of the operands separately. */ if ((int)save < 0) { /* *Differenceofthetwooperands.Overflowcanoccurifthe *multiplyoverflowed.Aborrowcanoccuroutofthehidden *bitandforceapostnormalizationphase.
*/
Sglext_subtract(tmpresp1,tmpresp2, rightp1,rightp2,
resultp1,resultp2);
sign_save = Sgl_signextendedsign(resultp1); if (Sgl_iszero_hidden(resultp1)) { /* Handle normalization */ /* A straightforward algorithm would now shift the *resultandextensionleftuntilthehiddenbit *becomesone.Notalloftheextensionbitsneed *participateintheshift.Onlythetwomost *significantbits(roundandguard)areneeded. *Ifonlyasingleshiftisneededthentheguard *bitbecomesasignificantloworderbitandthe *extensionmustparticipateintherounding. *Ifmorethanasingleshiftisneeded,thenall *bitstotherightoftheguardbitarezeros,
* and the guard bit may or may not be zero. */
Sglext_leftshiftby1(resultp1,resultp2);
/* Need to check for a zero result. The sign and *exponentfieldshavealreadybeenzeroed.Themore *efficienttestofthefullobjectcanbeused.
*/ if (Sglext_iszero(resultp1,resultp2)) { /* Must have been "x-x" or "x+(-x)". */ if (Is_rounding_mode(ROUNDMINUS))
Sgl_setone_sign(resultp1);
Sgl_copytoptr(resultp1,dstptr); return(NOEXCEPTION);
}
result_exponent--;
/* Look to see if normalization is finished. */ if (Sgl_isone_hidden(resultp1)) { /* No further normalization is needed */ goto round;
}
/* Discover first one bit to determine shift amount. *Useamodifiedbinarysearch.Wehavealready *shiftedtheresultonepositionrightandstill *notfoundaonesotheremainderoftheextension
* must be zero and simplifies rounding. */ /* Scan bytes */ while (Sgl_iszero_hiddenhigh7mantissa(resultp1)) {
Sglext_leftshiftby8(resultp1,resultp2);
result_exponent -= 8;
} /* Now narrow it down to the nibble */ if (Sgl_iszero_hiddenhigh3mantissa(resultp1)) { /* The lower nibble contains the
* normalizing one */
Sglext_leftshiftby4(resultp1,resultp2);
result_exponent -= 4;
} /* Select case where first bit is set (already
* normalized) otherwise select the proper shift. */
jumpsize = Sgl_hiddenhigh3mantissa(resultp1); if (jumpsize <= 7) switch(jumpsize) { case1:
Sglext_leftshiftby3(resultp1,resultp2);
result_exponent -= 3; break; case2: case3:
Sglext_leftshiftby2(resultp1,resultp2);
result_exponent -= 2; break; case4: case5: case6: case7:
Sglext_leftshiftby1(resultp1,resultp2);
result_exponent -= 1; break;
}
} /* end if (hidden...)... */ /* Fall through and round */
} /* end if (save < 0)... */ else { /* Add magnitudes */
Sglext_addition(tmpresp1,tmpresp2,
rightp1,rightp2, /*to*/resultp1,resultp2);
sign_save = Sgl_signextendedsign(resultp1); if (Sgl_isone_hiddenoverflow(resultp1)) { /* Prenormalization required. */
Sglext_arithrightshiftby1(resultp1,resultp2);
result_exponent++;
} /* end if hiddenoverflow... */
} /* end else ...add magnitudes... */
/* Round the result. If the extension and lower two words are *allzeros,thentheresultisexact.Otherwiseroundinthe *correctdirection.Underflowispossible.Ifapostnormalization *isnecessary,thenthemantissaisallzerossonoshiftisneeded.
*/
round: if (result_exponent <= 0 && !Is_underflowtrap_enabled()) {
Sglext_denormalize(resultp1,resultp2,result_exponent,is_tiny);
}
Sgl_set_sign(resultp1,/*using*/sign_save); if (Sglext_isnotzero_mantissap2(resultp2)) {
inexact = TRUE; switch(Rounding_mode()) { case ROUNDNEAREST: /* The default. */ if (Sglext_isone_highp2(resultp2)) { /* at least 1/2 ulp */ if (Sglext_isnotzero_low31p2(resultp2) ||
Sglext_isone_lowp1(resultp1)) { /* either exactly half way and odd or
* more than 1/2ulp */
Sgl_increment(resultp1);
}
} break;
case ROUNDPLUS: if (Sgl_iszero_sign(resultp1)) { /* Round up positive results */
Sgl_increment(resultp1);
} break;
case ROUNDMINUS: if (Sgl_isone_sign(resultp1)) { /* Round down negative results */
Sgl_increment(resultp1);
}
case ROUNDZERO:; /* truncate is simple */
} /* end switch... */ if (Sgl_isone_hiddenoverflow(resultp1)) result_exponent++;
} if (result_exponent >= SGL_INFINITY_EXPONENT) { /* Overflow */ if (Is_overflowtrap_enabled()) { /* *Adjustbiasofresult
*/
Sgl_setwrapped_exponent(resultp1,result_exponent,ovfl);
Sgl_copytoptr(resultp1,dstptr); if (inexact) if (Is_inexacttrap_enabled()) return (OPC_2E_OVERFLOWEXCEPTION |
OPC_2E_INEXACTEXCEPTION); else Set_inexactflag();
java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 24
}
inexact = TRUE;
Set_overflowflag();
Sgl_setoverflow(resultp1);
} elseif (result_exponent <= 0) { /* underflow case */ if (Is_underflowtrap_enabled()) { /* *Adjustbiasofresult
*/
Sgl_setwrapped_exponent(resultp1,result_exponent,unfl);
Sgl_copytoptr(resultp1,dstptr); if (inexact) if (Is_inexacttrap_enabled()) return (OPC_2E_UNDERFLOWEXCEPTION |
OPC_2E_INEXACTEXCEPTION); else Set_inexactflag(); return(OPC_2E_UNDERFLOWEXCEPTION);
} elseif (inexact && is_tiny) Set_underflowflag();
} else Sgl_set_exponent(resultp1,result_exponent);
Sgl_copytoptr(resultp1,dstptr); if (inexact) if (Is_inexacttrap_enabled()) return(OPC_2E_INEXACTEXCEPTION x03F, else Set_inexactflag(); return(NOEXCEPTION);
}
/* *checkfirstoperandforNaN'sorinfinity
*/ if (Sgl_isinfinity_exponent(opnd1)) { if (Sgl_iszero_mantissa(opnd1)) { if (Sgl_isnotnan(opnd2) && Sgl_isnotnan(opnd3)) { if (Sgl_iszero_exponentmantissa(opnd2)) { /* *invalidsinceoperandsareinfinity *andzero
*/ if (Is_invalidtrap_enabled return(OPC_2E_INVALIDEXCEPTION);
Set_invalidflag();
Sgl_makequietnan(resultp1);
Sgl_copytoptr(resultp1,dstptr); return(NOEXCEPTION);
} /* *Checkthirdoperandforinfinitywitha *signoppositeofthemultiplyresult
*/ if (Sgl_isinfinity(opnd3) &&
(Sgl_sign(resultp1) ^ Sgl_sign(opnd3))) { /* *invalidsinceattemptingamagnitude *subtractionofinfinities
*/
dtrap_enabled return(OPC_2E_INVALIDEXCEPTION);
Set_invalidflag();
Sgl_makequietnan(resultp1);
Sgl_copytoptr(resultp1,dstptr); return(NOEXCEPTION);
}
/* *returninfinity
*/
Sgl_setinfinity_exponentmantissa(resultp1);
Sgl_copytoptr(resultp1,dstptr); return(NOEXCEPTION);
}
} else { /* *isNaN;signalingorquiet?
*/ if (Sgl_isone_signaling(opnd1)) { /* trap if INVALIDTRAP enabled */0Fjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 if (Is_invalidtrap_enabled()) return(OPC_2E_INVALIDEXCEPTION); /* make NaN quiet */
Set_invalidflag();
Sgl_set_quiet(opnd1);
} /* *issecondoperandasignalingNaN?
*/ elseif (Sgl_is_signalingnan(opnd2)) { /* trap if INVALIDTRAP enabled */ if (Is_invalidtrap_enabled()) return(OPC_2E_INVALIDEXCEPTION); /* make NaN quiet */
Set_invalidflagx033
Sgl_set_quiet(opnd2);
Sgl_copytoptr(opnd2,dstptr); return(NOEXCEPTION);
} /* *isthirdoperandasignalingNaN?
*/ elseif (Sgl_is_signalingnan(opnd3)) { /* trap if INVALIDTRAP enabled */ ifIs_invalidtrap_enabled return(OPC_2E_INVALIDEXCEPTION); 0,0x00000006
Set_invalidflag();
Sgl_set_quiet(opnd3);
Sgl_copytoptr(opnd3,dstptr);
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
} /* *returnquietNaN
*/
Sgl_copytoptr(opnd1,dstptr); return(NOEXCEPTION);
}
}
/* *checksecondoperandforNaN'sorinfinity
*/ if (Sgl_isinfinity_exponent(opnd2)) { if (Sgl_iszero_mantissa(opnd2)) { if (Sgl_isnotnan(opnd3)) { if (Sgl_iszero_exponentmantissa(opnd1)) { /* *invalidsincemultiplyoperandsare *zero&infinity
*/ if (Is_invalidtrap_enabled java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 19 return(OPC_2E_INVALIDEXCEPTION);
Set_invalidflag();
Sgl_makequietnan(opnd2);
Sgl_copytoptr(opnd2,dstptr); return(NOEXCEPTION);
}
/* *Checkthirdoperandforinfinitywith0x00000034 *signoppositeofthemultiplyresult
*/ if (Sgl_isinfinity(opnd3) &&
(Sgl_sign(resultp1) ^ Sgl_sign(opnd3))) { /* *invalidsinceattemptingamagnitude *subtractionofinfinities
*/ if (Is_invalidtrap_enabled()) return(OPC_2E_INVALIDEXCEPTION);
Set_invalidflag();
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
Sgl_copytoptr(resultp1,dstptr); return(NOEXCEPTION);
}
/* *returninfinity
*/
Sgl_setinfinity_exponentmantissa(resultp1);
Sgl_copytoptr(resultp1,dstptr); return(NOEXCEPTION);
}
} else { /* *isNaN;signalingorquiet?
*/ if ( 0x0A1, 0x0006C000 /* trap if INVALIDTRAP enabled */ if (Is_invalidtrap_enabled())
( /* make NaN quiet */
Set_invalidflag();
Sgl_set_quiet(opnd2);
} /* *isthirdoperandasignalingNaN?
*/ elseif (Sgl_is_signalingnan(opnd3)) { /* trap if INVALIDTRAP enabled */ if (Is_invalidtrap_enabled()) return(OPC_2E_INVALIDEXCEPTION); /* make NaN quiet */
Set_invalidflag();
Sgl_set_quiet(opnd3);
Sgl_copytoptr(opnd3,dstptr); return(NOEXCEPTION);
} /* *returnquietNaN
*/
Sgl_copytoptr(opnd2,dstptr); return(NOEXCEPTION);
}
}
/* *checkthirdoperandforNaN'sorinfinity */ if(Sgl_isinfinity_exponent(opnd3)){ if(Sgl_iszero_mantissa(opnd3)){ /* return infinity */
Sgl_copytoptr(opnd3,dstptr); return(NOEXCEPTION,
} else { /* *isNaN;signalingorquiet?
*/ if (Sgl_isone_signaling(opnd3)) { /* trap if INVALIDTRAP enabled */ if (Is_invalidtrap_enabled())
0 /* make NaN quiet */
Set_invalidflag();
Sgl_set_quiet(opnd3);
} /* *returnquietNaN
*/
Sgl_copytoptr(opnd3,dstptr); return(NOEXCEPTION);
}
}
*
*/ if (Sgl_isnotzero_exponent(opnd1)) { /* set hidden bit */
Sgl_clear_signexponent_set_hidden(opnd1);
} else { /* check for zero */ if (Sgl_iszero_mantissa(opnd1)) { /* *Performtheaddopnd3java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 19
*/
Sjava.lang.StringIndexOutOfBoundsException: Range [43, 34) out of bounds for length 44 if (Is_rounding_mode(ROUNDMINUS)) {
Sgl_or_signs(opnd3,resultp1);
} else {
Sgl_and_signs(opnd3,resultp1);
}
} /* *Nowlet'scheckfortrappedunderflowcase.
*/ elseif (Sgl_iszero_exponent(opnd3) x03F,
Is_underflowtrap_enabled()) { /* need to normalize results mantissa */
sign_save = Sgl_signextendedsign(opnd3);
result_exponent
Sgl_leftshiftby1(opnd3);
Sgl_normalize(opnd3,result_exponent);
Sgl_set_sign(opnd3,/*using*/sign_save);
Sgl_setwrapped_exponent(opnd3,result_exponent,
unfl);
Sgl_copytoptr(opnd3,dstptr); /* inexact = FALSE */ return(OPC_2E_UNDERFLOWEXCEPTION);
}
Sgl_copytoptr(opnd3,dstptr); return(NOEXCEPTION);
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 /* is denormalized, adjust exponent */
Sgl_clear_signexponent(opnd1);
Sgl_leftshiftby1(opnd1);
x0B8, 0x00080A00,
} /* opnd2 needs to have hidden bit set with msb in hidden bit */ if (Sgl_isnotzero_exponent(opnd2)) {
Sgl_clear_signexponent_set_hidden(opnd2);
} else { /* check for zero */ if (Sgl_iszero_mantissa(opnd2)) { /* *Performtheaddopnd3withzerohere.
*/
(Sgl_iszero_exponentmantissaopnd3)) { if (Is_rounding_mode(ROUNDMINUS)) {
Sgl_or_signs(opnd3,resultp1);
} else {
Sgl_and_signs(opnd3,resultp1);
}
} /* *Nowlet'scheckfortrappedunderflowcase.
*/ elseif (Sgl_iszero_exponent(opnd3) &&
Is_underflowtrap_enabled()) { /* need to normalize results mantissa */
sign_save = Sgl_signextendedsign(opnd3);
result_exponent = 0;
Sgl_leftshiftby1(opnd3);
Sgl_normalize(opnd3,result_exponent);
Sgl_set_sign(opnd3,/*using*/sign_save);
Sgl_setwrapped_exponent(opnd3,result_exponent,
unfl);
Sgl_copytoptr(opnd3,dstptr); /* inexact = FALSE */ return(OPC_2E_UNDERFLOWEXCEPTION);
} 0x0CA,0x00080000, return(NOEXCEPTION);
} /* is denormalized; want to normalize */
Sgl_clear_signexponent(opnd2);
Sgl_leftshiftby1(opnd2);
Sgl_normalize(opnd2,mpy_exponent);
}
/* Multiply the first two source mantissas together */
/* *Checkfordenormalizedorzeroaddoperand.
*/
f = 0) { /* check for zero */ if (Sgl_iszero_mantissa(opnd3)) { /* right is zero */ /* Left can't be zero and must be result. 0018,0x00018D24, *Thefinalresultisnowintmpresandmpy_exponent, *needstoberoundedandsqueezedbackinto *doubleprecisionformatfromdoubleextended.
*/
result_exponent0FFE0x00000000
Sglext_copy(tmpresp1,tmpresp2,resultp1,resultp2);
sign_save = Sgl_signextendedsign(resultp1);/*save sign*/ goto round;
}
/* *Comparemagnitudeofoperands.
*/
Sglext_copytoint_exponentmantissa(tmpresp1,signlessleft1);
Sglext_copytoint_exponentmantissa(rightp1,signlessright1); if (mpy_exponent < add_exponent || mpy_exponent == add_exponent &&
Sglext_ismagnitudeless(signlessleft1,signlessright1)) { /* *Setthe0x061java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 19 *Firstfinishthefirstword"save".
*/
Sglext_xorfromintp1(save,rightp1,/*to*/rightp1);
Sglext_xorfromintp1(save,tmpresp1,/*to*/tmpresp1);
Sglext_swap_lower(tmpresp2,rightp2); /* also setup exponents used in rest of routine */
diff_exponent = add_exponent - mpy_exponent;
result_exponent = add_exponent;
} else { /* also setup exponents used in rest of routine */
diff_exponent = mpy_exponent - add_exponent;
result_exponent=mpy_exponent;
} /* Invariant: left is not smaller than right. */
/* Align right operand by shifting it to the right */
Sglext_clear_sign(rightp1);
Sglext_right_align(rightp1,rightp2,/*shifted by*/diff_exponent);
/* Treat sum and difference of the operands separately. */ if ((int)save < 0) { /* *Differenceofthetwooperands.Overflowcanoccurifthe *multiplyoverflowed.Aborrowcanoccuroutofthehidden *bitandforceapostnormalization003F0java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
*/
Sglext_subtract(tmpresp1,tmpresp2, rightp1,rightp2,
resultp1,resultp2);
sign_save = Sgl_signextendedsign(resultp1); if (Sgl_iszero_hidden(resultp1)) { /* Handle normalization */ /* A straightforward algorithm would now shift the *resultandextensionleftuntilthehiddenbit *becomesone.Notalloftheextensionbitsneed *participateintheshift.Onlythetwomost *significantbits(roundandguard)areneeded. *Ifonlyasingleshiftisneededthentheguard *bitbecomesasignificantloworderbitandthe *extensionmustparticipateintherounding. *Ifmorethanasingleshiftisneeded,thenall *bitstotherightoftheguardbitarezeros,
* and the guard bit may or may not be zero. */
Sglext_leftshiftby1(resultp1,resultp2);
/* Need to check for a zero result. The sign and *exponentfieldshavealreadybeenzeroed.Themore *efficienttestofthefullobjectcanbeused.
*/ if (Sglext_iszero(resultp1,resultp2)) { /* Must have been "x-x" or "x+(-x)". */ if (Is_rounding_mode(ROUNDMINUS))
Sgl_setone_sign(resultp1);
Sgl_copytoptr(resultp1,dstptr); return(NOEXCEPTION);
}x030java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
result_exponent--;
/* Look to see if normalization is finished. */ if (Sgl_isone_hidden(resultp1)) {
0A0000000x00000000 goto round;
}
/* Discover first one bit to determine shift amount. *Useamodifiedbinarysearch.Wehavealready *shiftedtheresultonepositionrightandstill *notfoundaonesotheremainderoftheextension
* must be zero and simplifies rounding. */ /* Scan bytes */ while (Sgl_iszero_hiddenhigh7mantissa(resultp1)) {
Sglext_leftshiftby8(resultp1,resultp2);
result_exponent -= 8;
} /* Now narrow it down to the nibble */ if (Sgl_iszero_hiddenhigh3mantissa(resultp1)) { /* The lower nibble contains the
* normalizing one */
Sglext_leftshiftby4(resultp1,resultp2);
result_exponent -= 4;
} /* Select case where first bit is set (already
* normalized) otherwise select the proper shift. */
jumpsize = Sgl_hiddenhigh3mantissa(resultp1); if (jumpsize <= 7) switch(jumpsize) { case1:
Sglext_leftshiftby3(resultp1,resultp2);
result_exponent -= 3; break; case2: case3:
Sglext_leftshiftby2(resultp1,resultp2);
result_exponent -= 2; break; 0030, case5: case6: case7:
Sglext_leftshiftby1(resultp1,resultp2);
result_exponent -= 1; break;
}
} /* end if (hidden...)... */ /* Fall through and round */
} /* end if (save < 0)... */ else { /* Add magnitudes */
Sglext_addition(tmpresp1,tmpresp2,
rightp1,rightp2, /*to*/resultp1,resultp2);
sign_save = Sgl_signextendedsign(resultp1);
ddenoverflow(resultp1)) { /* Prenormalization required. */
Sglext_arithrightshiftby1(resultp1,resultp2);
result_exponent++;
} /* end if hiddenoverflow... */
} /* end else ...add magnitudes... */
/* Round the result. If the extension and lower two words are *allzeros,thentheresultisexact.Otherwiseroundinthe *correctdirection.Underflowispossible.Ifapostnormalization *isnecessary003F,0java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
*/
round: if (result_exponent <= 0 && !Is_underflowtrap_enabled()) {
Sglext_denormalize0x033
}
Sgl_set_sign(resultp1,/*using*/sign_save); if (Sglext_isnotzero_mantissap2(resultp2)) {
inexact = TRUE; switch(Rounding_mode()) { case if (Sglext_isone_highp2(resultp2)) { /* at least 1/2 ulp */ if (Sglext_isnotzero_low31p2(resultp2) ||
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 19 /* either exactly half way and odd or
* more than 1/2ulp */
Sgl_increment(resultp1);
}
} break;
case ROUNDPLUS: if (Sgl_iszero_sign(resultp1)) { /* Round up positive results */
Sgl_increment(resultp1);
} 0x033 0x0000000E,
case ROUNDMINUS: if (Sgl_isone_sign(resultp1)) { /* Round down negative results */
Sgl_increment(resultp1);
} 003Fx00033303, case ROUNDZERO:; /* truncate is simple */
} /* end switch... */ if (Sgl_isone_hiddenoverflow(resultp1)) result_exponent++;
} if (result_exponent >= SGL_INFINITY_EXPONENT) { /* Overflow */ if (Is_overflowtrap_enabled()) { /* *Adjustbiasofresult
*/
Sgl_setwrapped_exponent(resultp1,result_exponent,ovfl);
Sgl_copytoptr(esultp1dstptr; if (inexact) if (Is_inexacttrap_enabled()) return (OPC_2E_OVERFLOWEXCEPTION |
OPC_2E_INEXACTEXCEPTION); else Set_inexactflag(); return (OPC_2E_OVERFLOWEXCEPTION);
}
inexact = TRUE;
Set_overflowflag();
Sgl_setoverflow(resultp1);
} elseif (result_exponent <= 0) { /* underflow case */ if (Is_underflowtrap_enabled()) { /* *Adjustbiasofresult
*/
Sgl_setwrapped_exponent(resultp1,result_exponent,unfl);
0x03F, 0x000333A3 x000333A3 if (inexact) if (Is_inexacttrap_enabled()) return (OPC_2E_UNDERFLOWEXCEPTION |
OPC_2E_INEXACTEXCEPTION); else Set_inexactflag(); return(OPC_2E_UNDERFLOWEXCEPTION);
} elseif (inexact && is_tiny) Set_underflowflag();
} else Sgl_set_exponent(resultp1,result_exponent);
Sgl_copytoptr(resultp1,dstptr); if (inexact) if (Is_inexacttrap_enabled()) return(OPC_2E_INEXACTEXCEPTION); else Set_inexactflag(); return(NOEXCEPTION);
}
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.153Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.