binary point immediately after the sign bit. Other value ranges are
obtained by scaling or shifting. In addition to the arithmetic, assignment,
and shift operations,
For more information about supported fractional arithmetic operators, see
"Fractional Arithmetic Operations" on page
demonstrating the use of the
Listing 1-2 on page
[
The current release of the software does not provide for automatic
scaling of fractional values.
Format of Fractional Literals
Fractional literals use the floating-point representation with an "
to distinguish them from floating-point literals, for example,
cc219x compiler validates fractional literal values at run time to ensure
they reside within the valid range of values.
Fractional literals are written with the "
loss. Literals without an "
verted to
fract
Conversions Involving Fractional Values
The following notes apply to type-conversion operations:
• Conversion between a fractional value and a floating value is sup-
ported. The conversion to the floating-point type may result in
some precision loss.
• Conversion between a fractional value and an integer value is sup-
ported. The conversion is not recommended because the only
common values are
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
for ADSP-219x DSPs
provides several type-conversion operations.
fract
fract
1-178, and
Listing 1-3 on page
" are of the type
r
as needed.
and
0
–1
1-92. For sample programs
type, see
Listing 1-1 on page
1-178.
" suffix to avoid certain precision
r
, and are implicitly con-
double
.
Compiler
1-177,
" suffix
r
. The
0.5r
1-91
Need help?
Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?