MATLAB Answers

Detect Overflow for full range and resolution

3 views (last 30 days)
Jogger on 19 Nov 2020
Edited: Jogger on 19 Nov 2020
I am looking for overflow and underflow during fixed point precision
I have following code
iwl and ifl is 32 bit wih
integer wordlength = 32 bits
integer floatlength = 24 bits
I would like to know under which circumstance overflow and underflow will happen
DWORD : 1signed+32WL+24FL
coefs = int64(-100:1:100)
scale = 2.^FL
max = (2.^WL-1)-1
min = -2.^WL-1
range = coefs*scale
How to derive condition for Overflow , underflow, range , resolution , slope and bias ?


Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!