What are the values ​​of single?

2 ビュー (過去 30 日間)
tomer kapuri
tomer kapuri 2018 年 12 月 1 日
編集済み: John D'Errico 2018 年 12 月 1 日
What are the values ​​of single?
Maximum values ​​and minimum values ​​( negative and positive)?
I could not understand..

回答 (1 件)

John D'Errico
John D'Errico 2018 年 12 月 1 日
編集済み: John D'Errico 2018 年 12 月 1 日
realmax('single')
ans =
single
3.4028e+38
-realmax('single')
ans =
single
-3.4028e+38
The sign is not relevant. And I'm not sure what you don't understand so perhaps you need to explain what is the question. A single precision number in MATLAB floating point is composed of a sign bit, an exponent stuffed into 8 bits, and a mantissa encoded as 23 binary bits, for a total of 32 bits (4 hex bytes) of information. dpb gave a useful reference that explains the basics.

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by