from double to single precision
조회 수: 51 (최근 30일)
이전 댓글 표시
I want to calcute this equation x= 3.0*(4.0/3.0-1.0)-1.0 but using single precision instead of double. How do I do switch to single?
댓글 수: 0
채택된 답변
Azzi Abdelmalek
2013년 10월 27일
single(x)
댓글 수: 3
Azzi Abdelmalek
2013년 10월 27일
x = 1 - 3*(4/3 - 1)
a=single(x)
whos x a
and see the difference
Azzi Abdelmalek
2013년 10월 27일
To get the smallest double and single number
realmin('double')
realmin('single')
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!