from double to single precision

53 ビュー (過去 30 日間)
Beaya
Beaya 2013 年 10 月 27 日
コメント済み: Azzi Abdelmalek 2013 年 10 月 27 日
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?

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 10 月 27 日
  3 件のコメント
Azzi Abdelmalek
Azzi Abdelmalek 2013 年 10 月 27 日
x = 1 - 3*(4/3 - 1)
a=single(x)
whos x a
and see the difference
Azzi Abdelmalek
Azzi Abdelmalek 2013 年 10 月 27 日
To get the smallest double and single number
realmin('double')
realmin('single')

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by