-
Notifications
You must be signed in to change notification settings - Fork 1
/
CORDICtable_HYPER.c
22 lines (19 loc) · 1.02 KB
/
CORDICtable_HYPER.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//CORDIC_HYPER, 26 bits, 25 iterations
// 1.0 = 8388608.000000 multiplication factor
// A = 1.118173 convergence angle (limit is 1.1181730 = 64.0deg)
// F = 0.828159 gain (limit is 0.82978162013890)
// 1/F = 1.207497 inverse gain (limit is 1.20513635844646)
// pi = 3.141593 (3.1415926536897932384626)
#define CORDIC_HYPER_A 1.118173 // CORDIC convergence angle A
#define CORDIC_HYPER_F 0x006A0120 // CORDIC gain F
#define CORDIC_HYPER_1F 0x009A8F44 // CORDIC inverse gain 1/F
#define CORDIC_HYPER_HALFPI 0x00C90FDB
#define CORDIC_HYPER_PI 0x01921FB5
#define CORDIC_HYPER_TWOPI 0x03243F6B
#define CORDIC_HYPER_MUL 8388608.000000 // CORDIC multiplication factor M = 2^23
#define CORDIC_HYPER_MAXITER 25
int CORDIC_HYPER_ZTBL[] = {
0x00000000, 0x00464FAA, 0x0020B15E, 0x00101589, 0x000802AC, 0x00040055, 0x0002000B, 0x00010001,
0x00008000, 0x00004000, 0x00002000, 0x00001000, 0x00000800, 0x00000400, 0x00000200, 0x00000100,
0x00000080, 0x00000040, 0x00000020, 0x00000010, 0x00000008, 0x00000004, 0x00000002, 0x00000001,
0x00000001 };