summaryrefslogtreecommitdiff
path: root/apps/plugins/lib/fixedpoint.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lib/fixedpoint.c')
-rw-r--r--apps/plugins/lib/fixedpoint.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/plugins/lib/fixedpoint.c b/apps/plugins/lib/fixedpoint.c
index 7b9b68a1e8..0ae2cded69 100644
--- a/apps/plugins/lib/fixedpoint.c
+++ b/apps/plugins/lib/fixedpoint.c
@@ -22,6 +22,7 @@
22 ****************************************************************************/ 22 ****************************************************************************/
23 23
24#include <inttypes.h> 24#include <inttypes.h>
25#include "plugin.h"
25#include "fixedpoint.h" 26#include "fixedpoint.h"
26 27
27/* Inverse gain of circular cordic rotation in s0.31 format. */ 28/* Inverse gain of circular cordic rotation in s0.31 format. */
@@ -144,7 +145,7 @@ long fsincos(unsigned long phase, long *cos)
144 */ 145 */
145long fsqrt(long a, unsigned int fracbits) 146long fsqrt(long a, unsigned int fracbits)
146{ 147{
147 long b = a/2 + (1 << fracbits); /* initial approximation */ 148 long b = a/2 + BIT_N(fracbits); /* initial approximation */
148 unsigned n; 149 unsigned n;
149 const unsigned iterations = 4; 150 const unsigned iterations = 4;
150 151