Why does fixed-point signal multiplication give different output depending on the datatype?
Show older comments
I have a Simulink model where a constant value of "-500" (stored as a "fixdt(1,16,0.1,-400)" ) is multiplied by "-1" via a product block in 3 different ways:
- By a constant value of "-1" stored as a fixed-point integer "fixdt(1,16,0.1,-400)".
- By a constant value of "-1" stored as an int8.
- By a constant value of "-1" stored as a single.
For each of these 3 cases I obtain a slightly different precision in the result.
Why does the datatype of "-1" affect the result of the product block?
Accepted Answer
More Answers (0)
Categories
Find more on Data Types in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!