from double to single precision
146 次查看(过去 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 中查找有关 Particle & Nuclear Physics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!