Using Complex Number Support - Analog Devices VISUALDSP++ 3.5 Manual

C/c++ compiler and library for adsp-219x processors
Hide thumbs Also See for VISUALDSP++ 3.5:
Table of Contents

Advertisement

For more information abut the fractional data type and arithmetic, see
"Fractional Type Support" on page
Listing 1-1. Example Code: Using Fract Data Type — C++ code
#include <fract>
#define N 20
fract x[N] = {.5r,.5r,.5r,.5r,.5r,.5r,.5r,.5r,.5r,
.5r,.5r,.5r,.5r,.5r,.5r,.5r,.5r,.5r,.5r,.5r};
fract y[N] = {0,.1r,.2r,.3r,.4r,.5r,.6r,.7r,.8r,.9r,.10r,.1r,
.2r,.3r,.4r,.5r,.6r,.7r,.8r,.9r};
fract fdot(int N, fract *x, fract *y)
{
int j;
fract s;
s = 0;
for (j=0; j<N; j++)
{
s += x[j] * y[j];
}
return s;
}
int main(void)
{
fdot(N,x,y);
}

Using Complex Number Support

The Mandelbrot fractal set is defined by the following iteration on com-
plex numbers:
z := z * z + c
The
values belong to the set for which the above iteration does not
c
diverge to infinity. The canonical set is defined when
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
for ADSP-219x DSPs
1-90.
z
Compiler
starts from
.
zero
1-177

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?

Questions and answers

Related Products for Analog Devices VISUALDSP++ 3.5

Table of Contents