Searched refs:nFracs (Results 1 – 1 of 1) sorted by relevance
106 public static float convertQFormatToFloat(int qIn, int nInts, int nFracs) { in convertQFormatToFloat() argument107 int intPart = (qIn >> nFracs); // extract integer part in convertQFormatToFloat()108 double fracPart = qIn & ((1 << nFracs) - 1); //extract fractional part in convertQFormatToFloat()109 fracPart = Math.pow(2, -nFracs) * fracPart; //convert fractional bits to float in convertQFormatToFloat()147 public static int convertFloatToQFormat(float in, int nInts, int nFracs) { in convertFloatToQFormat() argument151 qFracs = (int) ((in - qInt) * (1 << (nFracs))); in convertFloatToQFormat()152 inputStream = (qInt << nFracs) + qFracs; in convertFloatToQFormat()155 qFracs = (int) ((in - qInt) * (1 << (nFracs))); in convertFloatToQFormat()156 inputStream = (((1 << (nInts + 1)) + qInt) << nFracs) + qFracs; in convertFloatToQFormat()