comparison spandsp-0.0.6pre17/src/dds_float.c @ 4:26cd8f1ef0b1

import spandsp-0.0.6pre17
author Peter Meerwald <pmeerw@cosy.sbg.ac.at>
date Fri, 25 Jun 2010 15:50:58 +0200
parents
children
comparison
equal deleted inserted replaced
3:c6c5a16ce2f2 4:26cd8f1ef0b1
1 /*
2 * SpanDSP - a series of DSP components for telephony
3 *
4 * complex_dds.c
5 *
6 * Written by Steve Underwood <steveu@coppice.org>
7 *
8 * Copyright (C) 2003 Steve Underwood
9 *
10 * All rights reserved.
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 2.1,
14 * as published by the Free Software Foundation.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License for more details.
20 *
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with this program; if not, write to the Free Software
23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 *
25 * $Id: dds_float.c,v 1.11 2009/02/03 16:28:39 steveu Exp $
26 */
27
28 /*! \file */
29
30 #if defined(HAVE_CONFIG_H)
31 #include "config.h"
32 #endif
33
34 #include <stdio.h>
35 #include <inttypes.h>
36 #if defined(HAVE_TGMATH_H)
37 #include <tgmath.h>
38 #endif
39 #if defined(HAVE_MATH_H)
40 #include <math.h>
41 #endif
42 #include "floating_fudge.h"
43
44 #include "spandsp/telephony.h"
45 #include "spandsp/complex.h"
46 #include "spandsp/dds.h"
47
48 #define SLENK 11
49 #define SINELEN (1 << SLENK)
50
51 /* Precreating this table allows it to be in const memory, which might
52 have some performance advantage. */
53 static const float sine_table[SINELEN] =
54 {
55 0.00000000f,
56 0.00306796f,
57 0.00613588f,
58 0.00920375f,
59 0.01227154f,
60 0.01533921f,
61 0.01840673f,
62 0.02147408f,
63 0.02454123f,
64 0.02760815f,
65 0.03067480f,
66 0.03374117f,
67 0.03680722f,
68 0.03987293f,
69 0.04293826f,
70 0.04600318f,
71 0.04906767f,
72 0.05213170f,
73 0.05519524f,
74 0.05825826f,
75 0.06132074f,
76 0.06438263f,
77 0.06744392f,
78 0.07050457f,
79 0.07356456f,
80 0.07662386f,
81 0.07968244f,
82 0.08274026f,
83 0.08579731f,
84 0.08885355f,
85 0.09190896f,
86 0.09496350f,
87 0.09801714f,
88 0.10106986f,
89 0.10412163f,
90 0.10717242f,
91 0.11022221f,
92 0.11327095f,
93 0.11631863f,
94 0.11936521f,
95 0.12241068f,
96 0.12545498f,
97 0.12849811f,
98 0.13154003f,
99 0.13458071f,
100 0.13762012f,
101 0.14065824f,
102 0.14369503f,
103 0.14673047f,
104 0.14976453f,
105 0.15279719f,
106 0.15582840f,
107 0.15885814f,
108 0.16188639f,
109 0.16491312f,
110 0.16793829f,
111 0.17096189f,
112 0.17398387f,
113 0.17700422f,
114 0.18002290f,
115 0.18303989f,
116 0.18605515f,
117 0.18906866f,
118 0.19208040f,
119 0.19509032f,
120 0.19809841f,
121 0.20110463f,
122 0.20410897f,
123 0.20711138f,
124 0.21011184f,
125 0.21311032f,
126 0.21610680f,
127 0.21910124f,
128 0.22209362f,
129 0.22508391f,
130 0.22807208f,
131 0.23105811f,
132 0.23404196f,
133 0.23702361f,
134 0.24000302f,
135 0.24298018f,
136 0.24595505f,
137 0.24892761f,
138 0.25189782f,
139 0.25486566f,
140 0.25783110f,
141 0.26079412f,
142 0.26375468f,
143 0.26671276f,
144 0.26966833f,
145 0.27262136f,
146 0.27557182f,
147 0.27851969f,
148 0.28146494f,
149 0.28440754f,
150 0.28734746f,
151 0.29028468f,
152 0.29321916f,
153 0.29615089f,
154 0.29907983f,
155 0.30200595f,
156 0.30492923f,
157 0.30784964f,
158 0.31076715f,
159 0.31368174f,
160 0.31659338f,
161 0.31950203f,
162 0.32240768f,
163 0.32531029f,
164 0.32820984f,
165 0.33110631f,
166 0.33399965f,
167 0.33688985f,
168 0.33977688f,
169 0.34266072f,
170 0.34554132f,
171 0.34841868f,
172 0.35129276f,
173 0.35416353f,
174 0.35703096f,
175 0.35989504f,
176 0.36275572f,
177 0.36561300f,
178 0.36846683f,
179 0.37131719f,
180 0.37416406f,
181 0.37700741f,
182 0.37984721f,
183 0.38268343f,
184 0.38551605f,
185 0.38834505f,
186 0.39117038f,
187 0.39399204f,
188 0.39680999f,
189 0.39962420f,
190 0.40243465f,
191 0.40524131f,
192 0.40804416f,
193 0.41084317f,
194 0.41363831f,
195 0.41642956f,
196 0.41921689f,
197 0.42200027f,
198 0.42477968f,
199 0.42755509f,
200 0.43032648f,
201 0.43309382f,
202 0.43585708f,
203 0.43861624f,
204 0.44137127f,
205 0.44412214f,
206 0.44686884f,
207 0.44961133f,
208 0.45234959f,
209 0.45508359f,
210 0.45781330f,
211 0.46053871f,
212 0.46325978f,
213 0.46597650f,
214 0.46868882f,
215 0.47139674f,
216 0.47410021f,
217 0.47679923f,
218 0.47949376f,
219 0.48218377f,
220 0.48486925f,
221 0.48755016f,
222 0.49022648f,
223 0.49289819f,
224 0.49556526f,
225 0.49822767f,
226 0.50088538f,
227 0.50353838f,
228 0.50618665f,
229 0.50883014f,
230 0.51146885f,
231 0.51410274f,
232 0.51673180f,
233 0.51935599f,
234 0.52197529f,
235 0.52458968f,
236 0.52719913f,
237 0.52980362f,
238 0.53240313f,
239 0.53499762f,
240 0.53758708f,
241 0.54017147f,
242 0.54275078f,
243 0.54532499f,
244 0.54789406f,
245 0.55045797f,
246 0.55301671f,
247 0.55557023f,
248 0.55811853f,
249 0.56066158f,
250 0.56319934f,
251 0.56573181f,
252 0.56825895f,
253 0.57078075f,
254 0.57329717f,
255 0.57580819f,
256 0.57831380f,
257 0.58081396f,
258 0.58330865f,
259 0.58579786f,
260 0.58828155f,
261 0.59075970f,
262 0.59323230f,
263 0.59569930f,
264 0.59816071f,
265 0.60061648f,
266 0.60306660f,
267 0.60551104f,
268 0.60794978f,
269 0.61038281f,
270 0.61281008f,
271 0.61523159f,
272 0.61764731f,
273 0.62005721f,
274 0.62246128f,
275 0.62485949f,
276 0.62725182f,
277 0.62963824f,
278 0.63201874f,
279 0.63439328f,
280 0.63676186f,
281 0.63912444f,
282 0.64148101f,
283 0.64383154f,
284 0.64617601f,
285 0.64851440f,
286 0.65084668f,
287 0.65317284f,
288 0.65549285f,
289 0.65780669f,
290 0.66011434f,
291 0.66241578f,
292 0.66471098f,
293 0.66699992f,
294 0.66928259f,
295 0.67155895f,
296 0.67382900f,
297 0.67609270f,
298 0.67835004f,
299 0.68060100f,
300 0.68284555f,
301 0.68508367f,
302 0.68731534f,
303 0.68954054f,
304 0.69175926f,
305 0.69397146f,
306 0.69617713f,
307 0.69837625f,
308 0.70056879f,
309 0.70275474f,
310 0.70493408f,
311 0.70710678f,
312 0.70927283f,
313 0.71143220f,
314 0.71358487f,
315 0.71573083f,
316 0.71787005f,
317 0.72000251f,
318 0.72212819f,
319 0.72424708f,
320 0.72635916f,
321 0.72846439f,
322 0.73056277f,
323 0.73265427f,
324 0.73473888f,
325 0.73681657f,
326 0.73888732f,
327 0.74095113f,
328 0.74300795f,
329 0.74505779f,
330 0.74710061f,
331 0.74913639f,
332 0.75116513f,
333 0.75318680f,
334 0.75520138f,
335 0.75720885f,
336 0.75920919f,
337 0.76120239f,
338 0.76318842f,
339 0.76516727f,
340 0.76713891f,
341 0.76910334f,
342 0.77106052f,
343 0.77301045f,
344 0.77495311f,
345 0.77688847f,
346 0.77881651f,
347 0.78073723f,
348 0.78265060f,
349 0.78455660f,
350 0.78645521f,
351 0.78834643f,
352 0.79023022f,
353 0.79210658f,
354 0.79397548f,
355 0.79583690f,
356 0.79769084f,
357 0.79953727f,
358 0.80137617f,
359 0.80320753f,
360 0.80503133f,
361 0.80684755f,
362 0.80865618f,
363 0.81045720f,
364 0.81225059f,
365 0.81403633f,
366 0.81581441f,
367 0.81758481f,
368 0.81934752f,
369 0.82110251f,
370 0.82284978f,
371 0.82458930f,
372 0.82632106f,
373 0.82804505f,
374 0.82976123f,
375 0.83146961f,
376 0.83317016f,
377 0.83486287f,
378 0.83654773f,
379 0.83822471f,
380 0.83989379f,
381 0.84155498f,
382 0.84320824f,
383 0.84485357f,
384 0.84649094f,
385 0.84812034f,
386 0.84974177f,
387 0.85135519f,
388 0.85296060f,
389 0.85455799f,
390 0.85614733f,
391 0.85772861f,
392 0.85930182f,
393 0.86086694f,
394 0.86242396f,
395 0.86397286f,
396 0.86551362f,
397 0.86704625f,
398 0.86857071f,
399 0.87008699f,
400 0.87159509f,
401 0.87309498f,
402 0.87458665f,
403 0.87607009f,
404 0.87754529f,
405 0.87901223f,
406 0.88047089f,
407 0.88192126f,
408 0.88336334f,
409 0.88479710f,
410 0.88622253f,
411 0.88763962f,
412 0.88904836f,
413 0.89044872f,
414 0.89184071f,
415 0.89322430f,
416 0.89459949f,
417 0.89596625f,
418 0.89732458f,
419 0.89867447f,
420 0.90001589f,
421 0.90134885f,
422 0.90267332f,
423 0.90398929f,
424 0.90529676f,
425 0.90659570f,
426 0.90788612f,
427 0.90916798f,
428 0.91044129f,
429 0.91170603f,
430 0.91296219f,
431 0.91420976f,
432 0.91544872f,
433 0.91667906f,
434 0.91790078f,
435 0.91911385f,
436 0.92031828f,
437 0.92151404f,
438 0.92270113f,
439 0.92387953f,
440 0.92504924f,
441 0.92621024f,
442 0.92736253f,
443 0.92850608f,
444 0.92964090f,
445 0.93076696f,
446 0.93188427f,
447 0.93299280f,
448 0.93409255f,
449 0.93518351f,
450 0.93626567f,
451 0.93733901f,
452 0.93840353f,
453 0.93945922f,
454 0.94050607f,
455 0.94154407f,
456 0.94257320f,
457 0.94359346f,
458 0.94460484f,
459 0.94560733f,
460 0.94660091f,
461 0.94758559f,
462 0.94856135f,
463 0.94952818f,
464 0.95048607f,
465 0.95143502f,
466 0.95237501f,
467 0.95330604f,
468 0.95422810f,
469 0.95514117f,
470 0.95604525f,
471 0.95694034f,
472 0.95782641f,
473 0.95870347f,
474 0.95957151f,
475 0.96043052f,
476 0.96128049f,
477 0.96212140f,
478 0.96295327f,
479 0.96377607f,
480 0.96458979f,
481 0.96539444f,
482 0.96619000f,
483 0.96697647f,
484 0.96775384f,
485 0.96852209f,
486 0.96928124f,
487 0.97003125f,
488 0.97077214f,
489 0.97150389f,
490 0.97222650f,
491 0.97293995f,
492 0.97364425f,
493 0.97433938f,
494 0.97502535f,
495 0.97570213f,
496 0.97636973f,
497 0.97702814f,
498 0.97767736f,
499 0.97831737f,
500 0.97894818f,
501 0.97956977f,
502 0.98018214f,
503 0.98078528f,
504 0.98137919f,
505 0.98196387f,
506 0.98253930f,
507 0.98310549f,
508 0.98366242f,
509 0.98421009f,
510 0.98474850f,
511 0.98527764f,
512 0.98579751f,
513 0.98630810f,
514 0.98680940f,
515 0.98730142f,
516 0.98778414f,
517 0.98825757f,
518 0.98872169f,
519 0.98917651f,
520 0.98962202f,
521 0.99005821f,
522 0.99048508f,
523 0.99090264f,
524 0.99131086f,
525 0.99170975f,
526 0.99209931f,
527 0.99247953f,
528 0.99285041f,
529 0.99321195f,
530 0.99356414f,
531 0.99390697f,
532 0.99424045f,
533 0.99456457f,
534 0.99487933f,
535 0.99518473f,
536 0.99548076f,
537 0.99576741f,
538 0.99604470f,
539 0.99631261f,
540 0.99657115f,
541 0.99682030f,
542 0.99706007f,
543 0.99729046f,
544 0.99751146f,
545 0.99772307f,
546 0.99792529f,
547 0.99811811f,
548 0.99830154f,
549 0.99847558f,
550 0.99864022f,
551 0.99879546f,
552 0.99894129f,
553 0.99907773f,
554 0.99920476f,
555 0.99932238f,
556 0.99943060f,
557 0.99952942f,
558 0.99961882f,
559 0.99969882f,
560 0.99976941f,
561 0.99983058f,
562 0.99988235f,
563 0.99992470f,
564 0.99995764f,
565 0.99998118f,
566 0.99999529f,
567 1.00000000f,
568 0.99999529f,
569 0.99998118f,
570 0.99995764f,
571 0.99992470f,
572 0.99988235f,
573 0.99983058f,
574 0.99976941f,
575 0.99969882f,
576 0.99961882f,
577 0.99952942f,
578 0.99943060f,
579 0.99932238f,
580 0.99920476f,
581 0.99907773f,
582 0.99894129f,
583 0.99879546f,
584 0.99864022f,
585 0.99847558f,
586 0.99830154f,
587 0.99811811f,
588 0.99792529f,
589 0.99772307f,
590 0.99751146f,
591 0.99729046f,
592 0.99706007f,
593 0.99682030f,
594 0.99657115f,
595 0.99631261f,
596 0.99604470f,
597 0.99576741f,
598 0.99548076f,
599 0.99518473f,
600 0.99487933f,
601 0.99456457f,
602 0.99424045f,
603 0.99390697f,
604 0.99356414f,
605 0.99321195f,
606 0.99285041f,
607 0.99247953f,
608 0.99209931f,
609 0.99170975f,
610 0.99131086f,
611 0.99090264f,
612 0.99048508f,
613 0.99005821f,
614 0.98962202f,
615 0.98917651f,
616 0.98872169f,
617 0.98825757f,
618 0.98778414f,
619 0.98730142f,
620 0.98680940f,
621 0.98630810f,
622 0.98579751f,
623 0.98527764f,
624 0.98474850f,
625 0.98421009f,
626 0.98366242f,
627 0.98310549f,
628 0.98253930f,
629 0.98196387f,
630 0.98137919f,
631 0.98078528f,
632 0.98018214f,
633 0.97956977f,
634 0.97894818f,
635 0.97831737f,
636 0.97767736f,
637 0.97702814f,
638 0.97636973f,
639 0.97570213f,
640 0.97502535f,
641 0.97433938f,
642 0.97364425f,
643 0.97293995f,
644 0.97222650f,
645 0.97150389f,
646 0.97077214f,
647 0.97003125f,
648 0.96928124f,
649 0.96852209f,
650 0.96775384f,
651 0.96697647f,
652 0.96619000f,
653 0.96539444f,
654 0.96458979f,
655 0.96377607f,
656 0.96295327f,
657 0.96212140f,
658 0.96128049f,
659 0.96043052f,
660 0.95957151f,
661 0.95870347f,
662 0.95782641f,
663 0.95694034f,
664 0.95604525f,
665 0.95514117f,
666 0.95422810f,
667 0.95330604f,
668 0.95237501f,
669 0.95143502f,
670 0.95048607f,
671 0.94952818f,
672 0.94856135f,
673 0.94758559f,
674 0.94660091f,
675 0.94560733f,
676 0.94460484f,
677 0.94359346f,
678 0.94257320f,
679 0.94154407f,
680 0.94050607f,
681 0.93945922f,
682 0.93840353f,
683 0.93733901f,
684 0.93626567f,
685 0.93518351f,
686 0.93409255f,
687 0.93299280f,
688 0.93188427f,
689 0.93076696f,
690 0.92964090f,
691 0.92850608f,
692 0.92736253f,
693 0.92621024f,
694 0.92504924f,
695 0.92387953f,
696 0.92270113f,
697 0.92151404f,
698 0.92031828f,
699 0.91911385f,
700 0.91790078f,
701 0.91667906f,
702 0.91544872f,
703 0.91420976f,
704 0.91296219f,
705 0.91170603f,
706 0.91044129f,
707 0.90916798f,
708 0.90788612f,
709 0.90659570f,
710 0.90529676f,
711 0.90398929f,
712 0.90267332f,
713 0.90134885f,
714 0.90001589f,
715 0.89867447f,
716 0.89732458f,
717 0.89596625f,
718 0.89459949f,
719 0.89322430f,
720 0.89184071f,
721 0.89044872f,
722 0.88904836f,
723 0.88763962f,
724 0.88622253f,
725 0.88479710f,
726 0.88336334f,
727 0.88192126f,
728 0.88047089f,
729 0.87901223f,
730 0.87754529f,
731 0.87607009f,
732 0.87458665f,
733 0.87309498f,
734 0.87159509f,
735 0.87008699f,
736 0.86857071f,
737 0.86704625f,
738 0.86551362f,
739 0.86397286f,
740 0.86242396f,
741 0.86086694f,
742 0.85930182f,
743 0.85772861f,
744 0.85614733f,
745 0.85455799f,
746 0.85296060f,
747 0.85135519f,
748 0.84974177f,
749 0.84812034f,
750 0.84649094f,
751 0.84485357f,
752 0.84320824f,
753 0.84155498f,
754 0.83989379f,
755 0.83822471f,
756 0.83654773f,
757 0.83486287f,
758 0.83317016f,
759 0.83146961f,
760 0.82976123f,
761 0.82804505f,
762 0.82632106f,
763 0.82458930f,
764 0.82284978f,
765 0.82110251f,
766 0.81934752f,
767 0.81758481f,
768 0.81581441f,
769 0.81403633f,
770 0.81225059f,
771 0.81045720f,
772 0.80865618f,
773 0.80684755f,
774 0.80503133f,
775 0.80320753f,
776 0.80137617f,
777 0.79953727f,
778 0.79769084f,
779 0.79583690f,
780 0.79397548f,
781 0.79210658f,
782 0.79023022f,
783 0.78834643f,
784 0.78645521f,
785 0.78455660f,
786 0.78265060f,
787 0.78073723f,
788 0.77881651f,
789 0.77688847f,
790 0.77495311f,
791 0.77301045f,
792 0.77106052f,
793 0.76910334f,
794 0.76713891f,
795 0.76516727f,
796 0.76318842f,
797 0.76120239f,
798 0.75920919f,
799 0.75720885f,
800 0.75520138f,
801 0.75318680f,
802 0.75116513f,
803 0.74913639f,
804 0.74710061f,
805 0.74505779f,
806 0.74300795f,
807 0.74095113f,
808 0.73888732f,
809 0.73681657f,
810 0.73473888f,
811 0.73265427f,
812 0.73056277f,
813 0.72846439f,
814 0.72635916f,
815 0.72424708f,
816 0.72212819f,
817 0.72000251f,
818 0.71787005f,
819 0.71573083f,
820 0.71358487f,
821 0.71143220f,
822 0.70927283f,
823 0.70710678f,
824 0.70493408f,
825 0.70275474f,
826 0.70056879f,
827 0.69837625f,
828 0.69617713f,
829 0.69397146f,
830 0.69175926f,
831 0.68954054f,
832 0.68731534f,
833 0.68508367f,
834 0.68284555f,
835 0.68060100f,
836 0.67835004f,
837 0.67609270f,
838 0.67382900f,
839 0.67155895f,
840 0.66928259f,
841 0.66699992f,
842 0.66471098f,
843 0.66241578f,
844 0.66011434f,
845 0.65780669f,
846 0.65549285f,
847 0.65317284f,
848 0.65084668f,
849 0.64851440f,
850 0.64617601f,
851 0.64383154f,
852 0.64148101f,
853 0.63912444f,
854 0.63676186f,
855 0.63439328f,
856 0.63201874f,
857 0.62963824f,
858 0.62725182f,
859 0.62485949f,
860 0.62246128f,
861 0.62005721f,
862 0.61764731f,
863 0.61523159f,
864 0.61281008f,
865 0.61038281f,
866 0.60794978f,
867 0.60551104f,
868 0.60306660f,
869 0.60061648f,
870 0.59816071f,
871 0.59569930f,
872 0.59323230f,
873 0.59075970f,
874 0.58828155f,
875 0.58579786f,
876 0.58330865f,
877 0.58081396f,
878 0.57831380f,
879 0.57580819f,
880 0.57329717f,
881 0.57078075f,
882 0.56825895f,
883 0.56573181f,
884 0.56319934f,
885 0.56066158f,
886 0.55811853f,
887 0.55557023f,
888 0.55301671f,
889 0.55045797f,
890 0.54789406f,
891 0.54532499f,
892 0.54275078f,
893 0.54017147f,
894 0.53758708f,
895 0.53499762f,
896 0.53240313f,
897 0.52980362f,
898 0.52719913f,
899 0.52458968f,
900 0.52197529f,
901 0.51935599f,
902 0.51673180f,
903 0.51410274f,
904 0.51146885f,
905 0.50883014f,
906 0.50618665f,
907 0.50353838f,
908 0.50088538f,
909 0.49822767f,
910 0.49556526f,
911 0.49289819f,
912 0.49022648f,
913 0.48755016f,
914 0.48486925f,
915 0.48218377f,
916 0.47949376f,
917 0.47679923f,
918 0.47410021f,
919 0.47139674f,
920 0.46868882f,
921 0.46597650f,
922 0.46325978f,
923 0.46053871f,
924 0.45781330f,
925 0.45508359f,
926 0.45234959f,
927 0.44961133f,
928 0.44686884f,
929 0.44412214f,
930 0.44137127f,
931 0.43861624f,
932 0.43585708f,
933 0.43309382f,
934 0.43032648f,
935 0.42755509f,
936 0.42477968f,
937 0.42200027f,
938 0.41921689f,
939 0.41642956f,
940 0.41363831f,
941 0.41084317f,
942 0.40804416f,
943 0.40524131f,
944 0.40243465f,
945 0.39962420f,
946 0.39680999f,
947 0.39399204f,
948 0.39117038f,
949 0.38834505f,
950 0.38551605f,
951 0.38268343f,
952 0.37984721f,
953 0.37700741f,
954 0.37416406f,
955 0.37131719f,
956 0.36846683f,
957 0.36561300f,
958 0.36275572f,
959 0.35989504f,
960 0.35703096f,
961 0.35416353f,
962 0.35129276f,
963 0.34841868f,
964 0.34554132f,
965 0.34266072f,
966 0.33977688f,
967 0.33688985f,
968 0.33399965f,
969 0.33110631f,
970 0.32820984f,
971 0.32531029f,
972 0.32240768f,
973 0.31950203f,
974 0.31659338f,
975 0.31368174f,
976 0.31076715f,
977 0.30784964f,
978 0.30492923f,
979 0.30200595f,
980 0.29907983f,
981 0.29615089f,
982 0.29321916f,
983 0.29028468f,
984 0.28734746f,
985 0.28440754f,
986 0.28146494f,
987 0.27851969f,
988 0.27557182f,
989 0.27262136f,
990 0.26966833f,
991 0.26671276f,
992 0.26375468f,
993 0.26079412f,
994 0.25783110f,
995 0.25486566f,
996 0.25189782f,
997 0.24892761f,
998 0.24595505f,
999 0.24298018f,
1000 0.24000302f,
1001 0.23702361f,
1002 0.23404196f,
1003 0.23105811f,
1004 0.22807208f,
1005 0.22508391f,
1006 0.22209362f,
1007 0.21910124f,
1008 0.21610680f,
1009 0.21311032f,
1010 0.21011184f,
1011 0.20711138f,
1012 0.20410897f,
1013 0.20110463f,
1014 0.19809841f,
1015 0.19509032f,
1016 0.19208040f,
1017 0.18906866f,
1018 0.18605515f,
1019 0.18303989f,
1020 0.18002290f,
1021 0.17700422f,
1022 0.17398387f,
1023 0.17096189f,
1024 0.16793829f,
1025 0.16491312f,
1026 0.16188639f,
1027 0.15885814f,
1028 0.15582840f,
1029 0.15279719f,
1030 0.14976453f,
1031 0.14673047f,
1032 0.14369503f,
1033 0.14065824f,
1034 0.13762012f,
1035 0.13458071f,
1036 0.13154003f,
1037 0.12849811f,
1038 0.12545498f,
1039 0.12241068f,
1040 0.11936521f,
1041 0.11631863f,
1042 0.11327095f,
1043 0.11022221f,
1044 0.10717242f,
1045 0.10412163f,
1046 0.10106986f,
1047 0.09801714f,
1048 0.09496350f,
1049 0.09190896f,
1050 0.08885355f,
1051 0.08579731f,
1052 0.08274026f,
1053 0.07968244f,
1054 0.07662386f,
1055 0.07356456f,
1056 0.07050457f,
1057 0.06744392f,
1058 0.06438263f,
1059 0.06132074f,
1060 0.05825826f,
1061 0.05519524f,
1062 0.05213170f,
1063 0.04906767f,
1064 0.04600318f,
1065 0.04293826f,
1066 0.03987293f,
1067 0.03680722f,
1068 0.03374117f,
1069 0.03067480f,
1070 0.02760815f,
1071 0.02454123f,
1072 0.02147408f,
1073 0.01840673f,
1074 0.01533921f,
1075 0.01227154f,
1076 0.00920375f,
1077 0.00613588f,
1078 0.00306796f,
1079 0.00000000f,
1080 -0.00306796f,
1081 -0.00613588f,
1082 -0.00920375f,
1083 -0.01227154f,
1084 -0.01533921f,
1085 -0.01840673f,
1086 -0.02147408f,
1087 -0.02454123f,
1088 -0.02760815f,
1089 -0.03067480f,
1090 -0.03374117f,
1091 -0.03680722f,
1092 -0.03987293f,
1093 -0.04293826f,
1094 -0.04600318f,
1095 -0.04906767f,
1096 -0.05213170f,
1097 -0.05519524f,
1098 -0.05825826f,
1099 -0.06132074f,
1100 -0.06438263f,
1101 -0.06744392f,
1102 -0.07050457f,
1103 -0.07356456f,
1104 -0.07662386f,
1105 -0.07968244f,
1106 -0.08274026f,
1107 -0.08579731f,
1108 -0.08885355f,
1109 -0.09190896f,
1110 -0.09496350f,
1111 -0.09801714f,
1112 -0.10106986f,
1113 -0.10412163f,
1114 -0.10717242f,
1115 -0.11022221f,
1116 -0.11327095f,
1117 -0.11631863f,
1118 -0.11936521f,
1119 -0.12241068f,
1120 -0.12545498f,
1121 -0.12849811f,
1122 -0.13154003f,
1123 -0.13458071f,
1124 -0.13762012f,
1125 -0.14065824f,
1126 -0.14369503f,
1127 -0.14673047f,
1128 -0.14976453f,
1129 -0.15279719f,
1130 -0.15582840f,
1131 -0.15885814f,
1132 -0.16188639f,
1133 -0.16491312f,
1134 -0.16793829f,
1135 -0.17096189f,
1136 -0.17398387f,
1137 -0.17700422f,
1138 -0.18002290f,
1139 -0.18303989f,
1140 -0.18605515f,
1141 -0.18906866f,
1142 -0.19208040f,
1143 -0.19509032f,
1144 -0.19809841f,
1145 -0.20110463f,
1146 -0.20410897f,
1147 -0.20711138f,
1148 -0.21011184f,
1149 -0.21311032f,
1150 -0.21610680f,
1151 -0.21910124f,
1152 -0.22209362f,
1153 -0.22508391f,
1154 -0.22807208f,
1155 -0.23105811f,
1156 -0.23404196f,
1157 -0.23702361f,
1158 -0.24000302f,
1159 -0.24298018f,
1160 -0.24595505f,
1161 -0.24892761f,
1162 -0.25189782f,
1163 -0.25486566f,
1164 -0.25783110f,
1165 -0.26079412f,
1166 -0.26375468f,
1167 -0.26671276f,
1168 -0.26966833f,
1169 -0.27262136f,
1170 -0.27557182f,
1171 -0.27851969f,
1172 -0.28146494f,
1173 -0.28440754f,
1174 -0.28734746f,
1175 -0.29028468f,
1176 -0.29321916f,
1177 -0.29615089f,
1178 -0.29907983f,
1179 -0.30200595f,
1180 -0.30492923f,
1181 -0.30784964f,
1182 -0.31076715f,
1183 -0.31368174f,
1184 -0.31659338f,
1185 -0.31950203f,
1186 -0.32240768f,
1187 -0.32531029f,
1188 -0.32820984f,
1189 -0.33110631f,
1190 -0.33399965f,
1191 -0.33688985f,
1192 -0.33977688f,
1193 -0.34266072f,
1194 -0.34554132f,
1195 -0.34841868f,
1196 -0.35129276f,
1197 -0.35416353f,
1198 -0.35703096f,
1199 -0.35989504f,
1200 -0.36275572f,
1201 -0.36561300f,
1202 -0.36846683f,
1203 -0.37131719f,
1204 -0.37416406f,
1205 -0.37700741f,
1206 -0.37984721f,
1207 -0.38268343f,
1208 -0.38551605f,
1209 -0.38834505f,
1210 -0.39117038f,
1211 -0.39399204f,
1212 -0.39680999f,
1213 -0.39962420f,
1214 -0.40243465f,
1215 -0.40524131f,
1216 -0.40804416f,
1217 -0.41084317f,
1218 -0.41363831f,
1219 -0.41642956f,
1220 -0.41921689f,
1221 -0.42200027f,
1222 -0.42477968f,
1223 -0.42755509f,
1224 -0.43032648f,
1225 -0.43309382f,
1226 -0.43585708f,
1227 -0.43861624f,
1228 -0.44137127f,
1229 -0.44412214f,
1230 -0.44686884f,
1231 -0.44961133f,
1232 -0.45234959f,
1233 -0.45508359f,
1234 -0.45781330f,
1235 -0.46053871f,
1236 -0.46325978f,
1237 -0.46597650f,
1238 -0.46868882f,
1239 -0.47139674f,
1240 -0.47410021f,
1241 -0.47679923f,
1242 -0.47949376f,
1243 -0.48218377f,
1244 -0.48486925f,
1245 -0.48755016f,
1246 -0.49022648f,
1247 -0.49289819f,
1248 -0.49556526f,
1249 -0.49822767f,
1250 -0.50088538f,
1251 -0.50353838f,
1252 -0.50618665f,
1253 -0.50883014f,
1254 -0.51146885f,
1255 -0.51410274f,
1256 -0.51673180f,
1257 -0.51935599f,
1258 -0.52197529f,
1259 -0.52458968f,
1260 -0.52719913f,
1261 -0.52980362f,
1262 -0.53240313f,
1263 -0.53499762f,
1264 -0.53758708f,
1265 -0.54017147f,
1266 -0.54275078f,
1267 -0.54532499f,
1268 -0.54789406f,
1269 -0.55045797f,
1270 -0.55301671f,
1271 -0.55557023f,
1272 -0.55811853f,
1273 -0.56066158f,
1274 -0.56319934f,
1275 -0.56573181f,
1276 -0.56825895f,
1277 -0.57078075f,
1278 -0.57329717f,
1279 -0.57580819f,
1280 -0.57831380f,
1281 -0.58081396f,
1282 -0.58330865f,
1283 -0.58579786f,
1284 -0.58828155f,
1285 -0.59075970f,
1286 -0.59323230f,
1287 -0.59569930f,
1288 -0.59816071f,
1289 -0.60061648f,
1290 -0.60306660f,
1291 -0.60551104f,
1292 -0.60794978f,
1293 -0.61038281f,
1294 -0.61281008f,
1295 -0.61523159f,
1296 -0.61764731f,
1297 -0.62005721f,
1298 -0.62246128f,
1299 -0.62485949f,
1300 -0.62725182f,
1301 -0.62963824f,
1302 -0.63201874f,
1303 -0.63439328f,
1304 -0.63676186f,
1305 -0.63912444f,
1306 -0.64148101f,
1307 -0.64383154f,
1308 -0.64617601f,
1309 -0.64851440f,
1310 -0.65084668f,
1311 -0.65317284f,
1312 -0.65549285f,
1313 -0.65780669f,
1314 -0.66011434f,
1315 -0.66241578f,
1316 -0.66471098f,
1317 -0.66699992f,
1318 -0.66928259f,
1319 -0.67155895f,
1320 -0.67382900f,
1321 -0.67609270f,
1322 -0.67835004f,
1323 -0.68060100f,
1324 -0.68284555f,
1325 -0.68508367f,
1326 -0.68731534f,
1327 -0.68954054f,
1328 -0.69175926f,
1329 -0.69397146f,
1330 -0.69617713f,
1331 -0.69837625f,
1332 -0.70056879f,
1333 -0.70275474f,
1334 -0.70493408f,
1335 -0.70710678f,
1336 -0.70927283f,
1337 -0.71143220f,
1338 -0.71358487f,
1339 -0.71573083f,
1340 -0.71787005f,
1341 -0.72000251f,
1342 -0.72212819f,
1343 -0.72424708f,
1344 -0.72635916f,
1345 -0.72846439f,
1346 -0.73056277f,
1347 -0.73265427f,
1348 -0.73473888f,
1349 -0.73681657f,
1350 -0.73888732f,
1351 -0.74095113f,
1352 -0.74300795f,
1353 -0.74505779f,
1354 -0.74710061f,
1355 -0.74913639f,
1356 -0.75116513f,
1357 -0.75318680f,
1358 -0.75520138f,
1359 -0.75720885f,
1360 -0.75920919f,
1361 -0.76120239f,
1362 -0.76318842f,
1363 -0.76516727f,
1364 -0.76713891f,
1365 -0.76910334f,
1366 -0.77106052f,
1367 -0.77301045f,
1368 -0.77495311f,
1369 -0.77688847f,
1370 -0.77881651f,
1371 -0.78073723f,
1372 -0.78265060f,
1373 -0.78455660f,
1374 -0.78645521f,
1375 -0.78834643f,
1376 -0.79023022f,
1377 -0.79210658f,
1378 -0.79397548f,
1379 -0.79583690f,
1380 -0.79769084f,
1381 -0.79953727f,
1382 -0.80137617f,
1383 -0.80320753f,
1384 -0.80503133f,
1385 -0.80684755f,
1386 -0.80865618f,
1387 -0.81045720f,
1388 -0.81225059f,
1389 -0.81403633f,
1390 -0.81581441f,
1391 -0.81758481f,
1392 -0.81934752f,
1393 -0.82110251f,
1394 -0.82284978f,
1395 -0.82458930f,
1396 -0.82632106f,
1397 -0.82804505f,
1398 -0.82976123f,
1399 -0.83146961f,
1400 -0.83317016f,
1401 -0.83486287f,
1402 -0.83654773f,
1403 -0.83822471f,
1404 -0.83989379f,
1405 -0.84155498f,
1406 -0.84320824f,
1407 -0.84485357f,
1408 -0.84649094f,
1409 -0.84812034f,
1410 -0.84974177f,
1411 -0.85135519f,
1412 -0.85296060f,
1413 -0.85455799f,
1414 -0.85614733f,
1415 -0.85772861f,
1416 -0.85930182f,
1417 -0.86086694f,
1418 -0.86242396f,
1419 -0.86397286f,
1420 -0.86551362f,
1421 -0.86704625f,
1422 -0.86857071f,
1423 -0.87008699f,
1424 -0.87159509f,
1425 -0.87309498f,
1426 -0.87458665f,
1427 -0.87607009f,
1428 -0.87754529f,
1429 -0.87901223f,
1430 -0.88047089f,
1431 -0.88192126f,
1432 -0.88336334f,
1433 -0.88479710f,
1434 -0.88622253f,
1435 -0.88763962f,
1436 -0.88904836f,
1437 -0.89044872f,
1438 -0.89184071f,
1439 -0.89322430f,
1440 -0.89459949f,
1441 -0.89596625f,
1442 -0.89732458f,
1443 -0.89867447f,
1444 -0.90001589f,
1445 -0.90134885f,
1446 -0.90267332f,
1447 -0.90398929f,
1448 -0.90529676f,
1449 -0.90659570f,
1450 -0.90788612f,
1451 -0.90916798f,
1452 -0.91044129f,
1453 -0.91170603f,
1454 -0.91296219f,
1455 -0.91420976f,
1456 -0.91544872f,
1457 -0.91667906f,
1458 -0.91790078f,
1459 -0.91911385f,
1460 -0.92031828f,
1461 -0.92151404f,
1462 -0.92270113f,
1463 -0.92387953f,
1464 -0.92504924f,
1465 -0.92621024f,
1466 -0.92736253f,
1467 -0.92850608f,
1468 -0.92964090f,
1469 -0.93076696f,
1470 -0.93188427f,
1471 -0.93299280f,
1472 -0.93409255f,
1473 -0.93518351f,
1474 -0.93626567f,
1475 -0.93733901f,
1476 -0.93840353f,
1477 -0.93945922f,
1478 -0.94050607f,
1479 -0.94154407f,
1480 -0.94257320f,
1481 -0.94359346f,
1482 -0.94460484f,
1483 -0.94560733f,
1484 -0.94660091f,
1485 -0.94758559f,
1486 -0.94856135f,
1487 -0.94952818f,
1488 -0.95048607f,
1489 -0.95143502f,
1490 -0.95237501f,
1491 -0.95330604f,
1492 -0.95422810f,
1493 -0.95514117f,
1494 -0.95604525f,
1495 -0.95694034f,
1496 -0.95782641f,
1497 -0.95870347f,
1498 -0.95957151f,
1499 -0.96043052f,
1500 -0.96128049f,
1501 -0.96212140f,
1502 -0.96295327f,
1503 -0.96377607f,
1504 -0.96458979f,
1505 -0.96539444f,
1506 -0.96619000f,
1507 -0.96697647f,
1508 -0.96775384f,
1509 -0.96852209f,
1510 -0.96928124f,
1511 -0.97003125f,
1512 -0.97077214f,
1513 -0.97150389f,
1514 -0.97222650f,
1515 -0.97293995f,
1516 -0.97364425f,
1517 -0.97433938f,
1518 -0.97502535f,
1519 -0.97570213f,
1520 -0.97636973f,
1521 -0.97702814f,
1522 -0.97767736f,
1523 -0.97831737f,
1524 -0.97894818f,
1525 -0.97956977f,
1526 -0.98018214f,
1527 -0.98078528f,
1528 -0.98137919f,
1529 -0.98196387f,
1530 -0.98253930f,
1531 -0.98310549f,
1532 -0.98366242f,
1533 -0.98421009f,
1534 -0.98474850f,
1535 -0.98527764f,
1536 -0.98579751f,
1537 -0.98630810f,
1538 -0.98680940f,
1539 -0.98730142f,
1540 -0.98778414f,
1541 -0.98825757f,
1542 -0.98872169f,
1543 -0.98917651f,
1544 -0.98962202f,
1545 -0.99005821f,
1546 -0.99048508f,
1547 -0.99090264f,
1548 -0.99131086f,
1549 -0.99170975f,
1550 -0.99209931f,
1551 -0.99247953f,
1552 -0.99285041f,
1553 -0.99321195f,
1554 -0.99356414f,
1555 -0.99390697f,
1556 -0.99424045f,
1557 -0.99456457f,
1558 -0.99487933f,
1559 -0.99518473f,
1560 -0.99548076f,
1561 -0.99576741f,
1562 -0.99604470f,
1563 -0.99631261f,
1564 -0.99657115f,
1565 -0.99682030f,
1566 -0.99706007f,
1567 -0.99729046f,
1568 -0.99751146f,
1569 -0.99772307f,
1570 -0.99792529f,
1571 -0.99811811f,
1572 -0.99830154f,
1573 -0.99847558f,
1574 -0.99864022f,
1575 -0.99879546f,
1576 -0.99894129f,
1577 -0.99907773f,
1578 -0.99920476f,
1579 -0.99932238f,
1580 -0.99943060f,
1581 -0.99952942f,
1582 -0.99961882f,
1583 -0.99969882f,
1584 -0.99976941f,
1585 -0.99983058f,
1586 -0.99988235f,
1587 -0.99992470f,
1588 -0.99995764f,
1589 -0.99998118f,
1590 -0.99999529f,
1591 -1.00000000f,
1592 -0.99999529f,
1593 -0.99998118f,
1594 -0.99995764f,
1595 -0.99992470f,
1596 -0.99988235f,
1597 -0.99983058f,
1598 -0.99976941f,
1599 -0.99969882f,
1600 -0.99961882f,
1601 -0.99952942f,
1602 -0.99943060f,
1603 -0.99932238f,
1604 -0.99920476f,
1605 -0.99907773f,
1606 -0.99894129f,
1607 -0.99879546f,
1608 -0.99864022f,
1609 -0.99847558f,
1610 -0.99830154f,
1611 -0.99811811f,
1612 -0.99792529f,
1613 -0.99772307f,
1614 -0.99751146f,
1615 -0.99729046f,
1616 -0.99706007f,
1617 -0.99682030f,
1618 -0.99657115f,
1619 -0.99631261f,
1620 -0.99604470f,
1621 -0.99576741f,
1622 -0.99548076f,
1623 -0.99518473f,
1624 -0.99487933f,
1625 -0.99456457f,
1626 -0.99424045f,
1627 -0.99390697f,
1628 -0.99356414f,
1629 -0.99321195f,
1630 -0.99285041f,
1631 -0.99247953f,
1632 -0.99209931f,
1633 -0.99170975f,
1634 -0.99131086f,
1635 -0.99090264f,
1636 -0.99048508f,
1637 -0.99005821f,
1638 -0.98962202f,
1639 -0.98917651f,
1640 -0.98872169f,
1641 -0.98825757f,
1642 -0.98778414f,
1643 -0.98730142f,
1644 -0.98680940f,
1645 -0.98630810f,
1646 -0.98579751f,
1647 -0.98527764f,
1648 -0.98474850f,
1649 -0.98421009f,
1650 -0.98366242f,
1651 -0.98310549f,
1652 -0.98253930f,
1653 -0.98196387f,
1654 -0.98137919f,
1655 -0.98078528f,
1656 -0.98018214f,
1657 -0.97956977f,
1658 -0.97894818f,
1659 -0.97831737f,
1660 -0.97767736f,
1661 -0.97702814f,
1662 -0.97636973f,
1663 -0.97570213f,
1664 -0.97502535f,
1665 -0.97433938f,
1666 -0.97364425f,
1667 -0.97293995f,
1668 -0.97222650f,
1669 -0.97150389f,
1670 -0.97077214f,
1671 -0.97003125f,
1672 -0.96928124f,
1673 -0.96852209f,
1674 -0.96775384f,
1675 -0.96697647f,
1676 -0.96619000f,
1677 -0.96539444f,
1678 -0.96458979f,
1679 -0.96377607f,
1680 -0.96295327f,
1681 -0.96212140f,
1682 -0.96128049f,
1683 -0.96043052f,
1684 -0.95957151f,
1685 -0.95870347f,
1686 -0.95782641f,
1687 -0.95694034f,
1688 -0.95604525f,
1689 -0.95514117f,
1690 -0.95422810f,
1691 -0.95330604f,
1692 -0.95237501f,
1693 -0.95143502f,
1694 -0.95048607f,
1695 -0.94952818f,
1696 -0.94856135f,
1697 -0.94758559f,
1698 -0.94660091f,
1699 -0.94560733f,
1700 -0.94460484f,
1701 -0.94359346f,
1702 -0.94257320f,
1703 -0.94154407f,
1704 -0.94050607f,
1705 -0.93945922f,
1706 -0.93840353f,
1707 -0.93733901f,
1708 -0.93626567f,
1709 -0.93518351f,
1710 -0.93409255f,
1711 -0.93299280f,
1712 -0.93188427f,
1713 -0.93076696f,
1714 -0.92964090f,
1715 -0.92850608f,
1716 -0.92736253f,
1717 -0.92621024f,
1718 -0.92504924f,
1719 -0.92387953f,
1720 -0.92270113f,
1721 -0.92151404f,
1722 -0.92031828f,
1723 -0.91911385f,
1724 -0.91790078f,
1725 -0.91667906f,
1726 -0.91544872f,
1727 -0.91420976f,
1728 -0.91296219f,
1729 -0.91170603f,
1730 -0.91044129f,
1731 -0.90916798f,
1732 -0.90788612f,
1733 -0.90659570f,
1734 -0.90529676f,
1735 -0.90398929f,
1736 -0.90267332f,
1737 -0.90134885f,
1738 -0.90001589f,
1739 -0.89867447f,
1740 -0.89732458f,
1741 -0.89596625f,
1742 -0.89459949f,
1743 -0.89322430f,
1744 -0.89184071f,
1745 -0.89044872f,
1746 -0.88904836f,
1747 -0.88763962f,
1748 -0.88622253f,
1749 -0.88479710f,
1750 -0.88336334f,
1751 -0.88192126f,
1752 -0.88047089f,
1753 -0.87901223f,
1754 -0.87754529f,
1755 -0.87607009f,
1756 -0.87458665f,
1757 -0.87309498f,
1758 -0.87159509f,
1759 -0.87008699f,
1760 -0.86857071f,
1761 -0.86704625f,
1762 -0.86551362f,
1763 -0.86397286f,
1764 -0.86242396f,
1765 -0.86086694f,
1766 -0.85930182f,
1767 -0.85772861f,
1768 -0.85614733f,
1769 -0.85455799f,
1770 -0.85296060f,
1771 -0.85135519f,
1772 -0.84974177f,
1773 -0.84812034f,
1774 -0.84649094f,
1775 -0.84485357f,
1776 -0.84320824f,
1777 -0.84155498f,
1778 -0.83989379f,
1779 -0.83822471f,
1780 -0.83654773f,
1781 -0.83486287f,
1782 -0.83317016f,
1783 -0.83146961f,
1784 -0.82976123f,
1785 -0.82804505f,
1786 -0.82632106f,
1787 -0.82458930f,
1788 -0.82284978f,
1789 -0.82110251f,
1790 -0.81934752f,
1791 -0.81758481f,
1792 -0.81581441f,
1793 -0.81403633f,
1794 -0.81225059f,
1795 -0.81045720f,
1796 -0.80865618f,
1797 -0.80684755f,
1798 -0.80503133f,
1799 -0.80320753f,
1800 -0.80137617f,
1801 -0.79953727f,
1802 -0.79769084f,
1803 -0.79583690f,
1804 -0.79397548f,
1805 -0.79210658f,
1806 -0.79023022f,
1807 -0.78834643f,
1808 -0.78645521f,
1809 -0.78455660f,
1810 -0.78265060f,
1811 -0.78073723f,
1812 -0.77881651f,
1813 -0.77688847f,
1814 -0.77495311f,
1815 -0.77301045f,
1816 -0.77106052f,
1817 -0.76910334f,
1818 -0.76713891f,
1819 -0.76516727f,
1820 -0.76318842f,
1821 -0.76120239f,
1822 -0.75920919f,
1823 -0.75720885f,
1824 -0.75520138f,
1825 -0.75318680f,
1826 -0.75116513f,
1827 -0.74913639f,
1828 -0.74710061f,
1829 -0.74505779f,
1830 -0.74300795f,
1831 -0.74095113f,
1832 -0.73888732f,
1833 -0.73681657f,
1834 -0.73473888f,
1835 -0.73265427f,
1836 -0.73056277f,
1837 -0.72846439f,
1838 -0.72635916f,
1839 -0.72424708f,
1840 -0.72212819f,
1841 -0.72000251f,
1842 -0.71787005f,
1843 -0.71573083f,
1844 -0.71358487f,
1845 -0.71143220f,
1846 -0.70927283f,
1847 -0.70710678f,
1848 -0.70493408f,
1849 -0.70275474f,
1850 -0.70056879f,
1851 -0.69837625f,
1852 -0.69617713f,
1853 -0.69397146f,
1854 -0.69175926f,
1855 -0.68954054f,
1856 -0.68731534f,
1857 -0.68508367f,
1858 -0.68284555f,
1859 -0.68060100f,
1860 -0.67835004f,
1861 -0.67609270f,
1862 -0.67382900f,
1863 -0.67155895f,
1864 -0.66928259f,
1865 -0.66699992f,
1866 -0.66471098f,
1867 -0.66241578f,
1868 -0.66011434f,
1869 -0.65780669f,
1870 -0.65549285f,
1871 -0.65317284f,
1872 -0.65084668f,
1873 -0.64851440f,
1874 -0.64617601f,
1875 -0.64383154f,
1876 -0.64148101f,
1877 -0.63912444f,
1878 -0.63676186f,
1879 -0.63439328f,
1880 -0.63201874f,
1881 -0.62963824f,
1882 -0.62725182f,
1883 -0.62485949f,
1884 -0.62246128f,
1885 -0.62005721f,
1886 -0.61764731f,
1887 -0.61523159f,
1888 -0.61281008f,
1889 -0.61038281f,
1890 -0.60794978f,
1891 -0.60551104f,
1892 -0.60306660f,
1893 -0.60061648f,
1894 -0.59816071f,
1895 -0.59569930f,
1896 -0.59323230f,
1897 -0.59075970f,
1898 -0.58828155f,
1899 -0.58579786f,
1900 -0.58330865f,
1901 -0.58081396f,
1902 -0.57831380f,
1903 -0.57580819f,
1904 -0.57329717f,
1905 -0.57078075f,
1906 -0.56825895f,
1907 -0.56573181f,
1908 -0.56319934f,
1909 -0.56066158f,
1910 -0.55811853f,
1911 -0.55557023f,
1912 -0.55301671f,
1913 -0.55045797f,
1914 -0.54789406f,
1915 -0.54532499f,
1916 -0.54275078f,
1917 -0.54017147f,
1918 -0.53758708f,
1919 -0.53499762f,
1920 -0.53240313f,
1921 -0.52980362f,
1922 -0.52719913f,
1923 -0.52458968f,
1924 -0.52197529f,
1925 -0.51935599f,
1926 -0.51673180f,
1927 -0.51410274f,
1928 -0.51146885f,
1929 -0.50883014f,
1930 -0.50618665f,
1931 -0.50353838f,
1932 -0.50088538f,
1933 -0.49822767f,
1934 -0.49556526f,
1935 -0.49289819f,
1936 -0.49022648f,
1937 -0.48755016f,
1938 -0.48486925f,
1939 -0.48218377f,
1940 -0.47949376f,
1941 -0.47679923f,
1942 -0.47410021f,
1943 -0.47139674f,
1944 -0.46868882f,
1945 -0.46597650f,
1946 -0.46325978f,
1947 -0.46053871f,
1948 -0.45781330f,
1949 -0.45508359f,
1950 -0.45234959f,
1951 -0.44961133f,
1952 -0.44686884f,
1953 -0.44412214f,
1954 -0.44137127f,
1955 -0.43861624f,
1956 -0.43585708f,
1957 -0.43309382f,
1958 -0.43032648f,
1959 -0.42755509f,
1960 -0.42477968f,
1961 -0.42200027f,
1962 -0.41921689f,
1963 -0.41642956f,
1964 -0.41363831f,
1965 -0.41084317f,
1966 -0.40804416f,
1967 -0.40524131f,
1968 -0.40243465f,
1969 -0.39962420f,
1970 -0.39680999f,
1971 -0.39399204f,
1972 -0.39117038f,
1973 -0.38834505f,
1974 -0.38551605f,
1975 -0.38268343f,
1976 -0.37984721f,
1977 -0.37700741f,
1978 -0.37416406f,
1979 -0.37131719f,
1980 -0.36846683f,
1981 -0.36561300f,
1982 -0.36275572f,
1983 -0.35989504f,
1984 -0.35703096f,
1985 -0.35416353f,
1986 -0.35129276f,
1987 -0.34841868f,
1988 -0.34554132f,
1989 -0.34266072f,
1990 -0.33977688f,
1991 -0.33688985f,
1992 -0.33399965f,
1993 -0.33110631f,
1994 -0.32820984f,
1995 -0.32531029f,
1996 -0.32240768f,
1997 -0.31950203f,
1998 -0.31659338f,
1999 -0.31368174f,
2000 -0.31076715f,
2001 -0.30784964f,
2002 -0.30492923f,
2003 -0.30200595f,
2004 -0.29907983f,
2005 -0.29615089f,
2006 -0.29321916f,
2007 -0.29028468f,
2008 -0.28734746f,
2009 -0.28440754f,
2010 -0.28146494f,
2011 -0.27851969f,
2012 -0.27557182f,
2013 -0.27262136f,
2014 -0.26966833f,
2015 -0.26671276f,
2016 -0.26375468f,
2017 -0.26079412f,
2018 -0.25783110f,
2019 -0.25486566f,
2020 -0.25189782f,
2021 -0.24892761f,
2022 -0.24595505f,
2023 -0.24298018f,
2024 -0.24000302f,
2025 -0.23702361f,
2026 -0.23404196f,
2027 -0.23105811f,
2028 -0.22807208f,
2029 -0.22508391f,
2030 -0.22209362f,
2031 -0.21910124f,
2032 -0.21610680f,
2033 -0.21311032f,
2034 -0.21011184f,
2035 -0.20711138f,
2036 -0.20410897f,
2037 -0.20110463f,
2038 -0.19809841f,
2039 -0.19509032f,
2040 -0.19208040f,
2041 -0.18906866f,
2042 -0.18605515f,
2043 -0.18303989f,
2044 -0.18002290f,
2045 -0.17700422f,
2046 -0.17398387f,
2047 -0.17096189f,
2048 -0.16793829f,
2049 -0.16491312f,
2050 -0.16188639f,
2051 -0.15885814f,
2052 -0.15582840f,
2053 -0.15279719f,
2054 -0.14976453f,
2055 -0.14673047f,
2056 -0.14369503f,
2057 -0.14065824f,
2058 -0.13762012f,
2059 -0.13458071f,
2060 -0.13154003f,
2061 -0.12849811f,
2062 -0.12545498f,
2063 -0.12241068f,
2064 -0.11936521f,
2065 -0.11631863f,
2066 -0.11327095f,
2067 -0.11022221f,
2068 -0.10717242f,
2069 -0.10412163f,
2070 -0.10106986f,
2071 -0.09801714f,
2072 -0.09496350f,
2073 -0.09190896f,
2074 -0.08885355f,
2075 -0.08579731f,
2076 -0.08274026f,
2077 -0.07968244f,
2078 -0.07662386f,
2079 -0.07356456f,
2080 -0.07050457f,
2081 -0.06744392f,
2082 -0.06438263f,
2083 -0.06132074f,
2084 -0.05825826f,
2085 -0.05519524f,
2086 -0.05213170f,
2087 -0.04906767f,
2088 -0.04600318f,
2089 -0.04293826f,
2090 -0.03987293f,
2091 -0.03680722f,
2092 -0.03374117f,
2093 -0.03067480f,
2094 -0.02760815f,
2095 -0.02454123f,
2096 -0.02147408f,
2097 -0.01840673f,
2098 -0.01533921f,
2099 -0.01227154f,
2100 -0.00920375f,
2101 -0.00613588f,
2102 -0.00306796f
2103 };
2104
2105 SPAN_DECLARE(int32_t) dds_phase_ratef(float frequency)
2106 {
2107 return (int32_t) (frequency*65536.0f*65536.0f/SAMPLE_RATE);
2108 }
2109 /*- End of function --------------------------------------------------------*/
2110
2111 SPAN_DECLARE(float) dds_frequencyf(int32_t phase_rate)
2112 {
2113 return (float) phase_rate*(float) SAMPLE_RATE/(65536.0f*65536.0f);
2114 }
2115 /*- End of function --------------------------------------------------------*/
2116
2117 SPAN_DECLARE(float) dds_scaling_dbm0f(float level)
2118 {
2119 return powf(10.0f, (level - DBM0_MAX_SINE_POWER)/20.0f)*32767.0f;
2120 }
2121 /*- End of function --------------------------------------------------------*/
2122
2123 SPAN_DECLARE(float) dds_scaling_dbovf(float level)
2124 {
2125 return powf(10.0f, (level - DBOV_MAX_SINE_POWER)/20.0f)*32767.0f;
2126 }
2127 /*- End of function --------------------------------------------------------*/
2128
2129 SPAN_DECLARE(void) dds_advancef(uint32_t *phase_acc, int32_t phase_rate)
2130 {
2131 *phase_acc += phase_rate;
2132 }
2133 /*- End of function --------------------------------------------------------*/
2134
2135 SPAN_DECLARE(float) ddsf(uint32_t *phase_acc, int32_t phase_rate)
2136 {
2137 float amp;
2138
2139 amp = sine_table[*phase_acc >> (32 - SLENK)];
2140 *phase_acc += phase_rate;
2141 return amp;
2142 }
2143 /*- End of function --------------------------------------------------------*/
2144
2145 SPAN_DECLARE(float) dds_lookupf(uint32_t phase)
2146 {
2147 return sine_table[phase >> (32 - SLENK)];
2148 }
2149 /*- End of function --------------------------------------------------------*/
2150
2151 SPAN_DECLARE(float) dds_modf(uint32_t *phase_acc, int32_t phase_rate, float scale, int32_t phase)
2152 {
2153 float amp;
2154
2155 amp = sine_table[*(phase_acc + phase) >> (32 - SLENK)]*scale;
2156 *phase_acc += phase_rate;
2157 return amp;
2158 }
2159 /*- End of function --------------------------------------------------------*/
2160
2161 SPAN_DECLARE(complexf_t) dds_complexf(uint32_t *phase_acc, int32_t phase_rate)
2162 {
2163 complexf_t amp;
2164
2165 amp = complex_setf(sine_table[(*phase_acc + (1 << 30)) >> (32 - SLENK)],
2166 sine_table[*phase_acc >> (32 - SLENK)]);
2167 *phase_acc += phase_rate;
2168 return amp;
2169 }
2170 /*- End of function --------------------------------------------------------*/
2171
2172 SPAN_DECLARE(complexf_t) dds_lookup_complexf(uint32_t phase)
2173 {
2174 return complex_setf(sine_table[(phase + (1 << 30)) >> (32 - SLENK)],
2175 sine_table[phase >> (32 - SLENK)]);
2176 }
2177 /*- End of function --------------------------------------------------------*/
2178
2179 SPAN_DECLARE(complexf_t) dds_complex_modf(uint32_t *phase_acc, int32_t phase_rate, float scale, int32_t phase)
2180 {
2181 complexf_t amp;
2182
2183 amp = complex_setf(sine_table[(*phase_acc + phase + (1 << 30)) >> (32 - SLENK)]*scale,
2184 sine_table[(*phase_acc + phase) >> (32 - SLENK)]*scale);
2185 *phase_acc += phase_rate;
2186 return amp;
2187 }
2188 /*- End of function --------------------------------------------------------*/
2189 /*- End of file ------------------------------------------------------------*/

Repositories maintained by Peter Meerwald, pmeerw@pmeerw.net.