CMSIS DSP Lib
Fork of mbed-dsp by
Diff: cmsis_dsp/FastMathFunctions/arm_cos_q15.c
- Revision:
- 2:da51fb522205
- Parent:
- 1:fdd22bb7aa52
- Child:
- 3:7a284390b0ce
diff -r fdd22bb7aa52 -r da51fb522205 cmsis_dsp/FastMathFunctions/arm_cos_q15.c --- a/cmsis_dsp/FastMathFunctions/arm_cos_q15.c Wed Nov 28 12:30:09 2012 +0000 +++ b/cmsis_dsp/FastMathFunctions/arm_cos_q15.c Thu May 30 17:10:11 2013 +0100 @@ -2,12 +2,12 @@ * Copyright (C) 2010 ARM Limited. All rights reserved. * * $Date: 15. February 2012 -* $Revision: V1.1.0 +* $Revision: V1.1.0 * -* Project: CMSIS DSP Library -* Title: arm_cos_q15.c +* Project: CMSIS DSP Library +* Title: arm_cos_q15.c * -* Description: Fast cosine calculation for Q15 values. +* Description: Fast cosine calculation for Q15 values. * * Target Processor: Cortex-M4/Cortex-M3/Cortex-M0 * @@ -49,15 +49,15 @@ * tableSize = 256; * <pre>for(n = -1; n < (tableSize + 1); n++) * { -* cosTable[n+1]= cos(2*pi*n/tableSize); +* cosTable[n+1]= cos(2*pi*n/tableSize); * }</pre> * where pi value is 3.14159265358979 * \par * Secondly Convert Floating point to Q15(Fixed point): -* (cosTable[i] * pow(2, 15)) +* (cosTable[i] * pow(2, 15)) * \par * Finally Rounding to nearest integer is done -* cosTable[i] += (cosTable[i] > 0 ? 0.5 :-0.5); +* cosTable[i] += (cosTable[i] > 0 ? 0.5 :-0.5); */ static const q15_t cosTableQ15[259] = {