ERROR: floating constant is out of range
조회 수: 9 (최근 30일)
이전 댓글 표시
I have created a algorithm in Simulink. I tried to implement this model to TI TMS320F28379D LAUNCHXL board embedded target. When I try to build the model, I receive the following error messages.
This is one of the code segments that caused error
댓글 수: 1
Walter Roberson
2022년 10월 29일
편집: Walter Roberson
2022년 10월 29일
I wonder where that constant comes from; too bad it isn't documented. It happens to be 0x1cc0000000000000 but that does not tell me anything about what it represents.
Ah... with further checking I see that it is
format long g
eps(sqrt(realmin))
and that suggests its replacement value should be
eps(sqrt(realmin('single')))
채택된 답변
Mike Hosea
2019년 5월 7일
That number is well within the range of IEEE double precision floating point numbers, but the TI TMS320F28379D has native 32bit IEEE single precision floating point. I'm not sure what the C compiler for it does with double precision data, but based on what you have shown, it doesn't seem to support IEEE double precision floating point, even in emulation. Try using single precision.
댓글 수: 3
Dajr Alfred
2023년 5월 15일
The easiest way to accomplish this with simulink is to use the Single Point Converter in the Apps tab
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!