MCPcopy Create free account
hub / github.com/RangeNetworks/openbts / sinLookup

Function sinLookup

Transceiver52M/sigProcLib.cpp:221–232  ·  view source on GitHub ↗

compute sine via lookup table */

Source from the content-addressed store, hash-verified

219
220/** compute sine via lookup table */
221float sinLookup(const float x)
222{
223 float arg = x*M_1_2PI_F;
224 while (arg > 1.0F) arg -= 1.0F;
225 while (arg < 0.0F) arg += 1.0F;
226
227 const float argT = arg*((float)TABLESIZE);
228 const int argI = (int)argT;
229 const float delta = argT-argI;
230 const float iDelta = 1.0F-delta;
231 return iDelta*sinTable[argI] + delta*sinTable[argI+1];
232}
233
234
235/** compute e^(-jx) via lookup table. */

Callers 1

sincFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected