int temp; int temp1 = FAC[mant]; int temp2 = 6 - exp; int temp3 = 1 << (temp2 - 1);
short temp; short temp1 = FAC[mant]; short temp2 = Helper.gsm_sub((short) 6, exp); short temp3 = Helper.shortify(1 << Helper.gsm_sub(temp2, (short) 1));
    public void work()     {	/**	 *  Inputs to RPEDecodeFilter: Xmaxc - Maximum value of the 13 bits, 	 *                     Xmc - 13 bit sample	 *                     Mc - 2 bit grid positioning	 */		for (int i = 0; i < 13; i++)	{	    mXmc[i] = input.popInt();	}	int xmaxc = input.popInt();    //mRpeMagnitude	int mc = input.popInt();       //mRpeGridPosition	 	//Get the exponent, mantissa of Xmaxc:       	int exp = 0;	if (xmaxc > 15)	    {		exp = (xmaxc >> 3) - 1;	    }	int mant = xmaxc - (exp << 3);		//normalize mantissa 0 <= mant <= 7;		if (mant == 0)	    {		exp = -4;		mant = 7;	    }	else	    {		while (mant <= 7) 		    {			mant = mant << 1 | 1;			exp--;		    }		mant -= 8;	    }		/* 	 *  This part is for decoding the RPE sequence of coded Xmc[0..12]	 *  samples to obtain the xMp[0..12] array.  Table 4.6 is used to get	 *  the mantissa of xmaxc (FAC[0..7]).	 */		int temp;	int temp1 = FAC[mant];	int temp2 = 6 - exp;	int temp3 = 1 << (temp2 - 1);	for (int i = 0; i < 13; i++)	    {		temp = (mXmc[i] << 1) - 7;    //3 bit unsigned		temp <<= 12;                 //16 bit signed		temp = temp1 * temp;		temp += temp3;		xmp[i] = temp >> temp2;	    }	/**	 *  This procedure computes the reconstructed long term residual signal	 *  ep[0..39] for the LTP analysis filter.  The inputs are the Mc	 *  which is the grid position selection and the xMp[0..12] decoded	 *  RPE samples which are upsampled by a factor of 3 by inserting zero	 *  values.	 */         //output!	for(int k = 0; k < 40; k++)	    {		ep[k] = 0;	    }	for(int i = 0; i < 12; i++)	    {		ep[mc + (3 * i)] = xmp[i];	    } 	//output the sucker!	for (int i = 0; i < ep.length; i++)	{	    output.pushInt(ep[i]);	}    }