名稱空間
變體
操作

標準庫標頭檔案 <stdfloat> (C++23)

來自 cppreference.com
 
 
標準庫標頭檔案
演算法
<algorithm>
<numeric>
字串
<cctype>
<cstring>
<cuchar> (C++11)
<cwchar>
<cwctype>
<string_view> (C++17)
<string>
文字處理
<clocale>
<codecvt> (C++11/17/26*)
<locale>
<regex> (C++11)
<text_encoding> (C++26)   
數值
<cfenv> (C++11)
<cmath>
<complex>
<linalg> (C++26)
<numbers> (C++20)
<random> (C++11)
<simd> (C++26)
<valarray>
時間
<chrono> (C++11)
<ctime>
C 相容性
<ccomplex> (C++11/17/20*)
<ciso646> (直到 C++20)
<cstdalign> (C++11/17/20*)
<cstdbool> (C++11/17/20*)
<ctgmath> (C++11/17/20*)
 

此標頭檔案是型別支援庫的一部分,提供固定寬度浮點型別

目錄

型別

寬度分別為精確 16、32、64 和 128 位的二進位制浮點型別
(typedef) [編輯]
(C++23)(可選)
精確 16 位的腦浮點型別
(typedef) [編輯]

[編輯] 注意

固定寬度浮點型別必須是擴充套件浮點型別(而不是 float / double / long double)的別名,因此不能作為標準浮點型別的直接替代品。

[編輯] 概要

namespace std {
  #if defined(__STDCPP_FLOAT16_T__)
    using float16_t  = /* implementation-defined */;
  #endif
  #if defined(__STDCPP_FLOAT32_T__)
    using float32_t  = /* implementation-defined */;
  #endif
  #if defined(__STDCPP_FLOAT64_T__)
    using float64_t  = /* implementation-defined */;
  #endif
  #if defined(__STDCPP_FLOAT128_T__)
    using float128_t = /* implementation-defined */;
  #endif
  #if defined(__STDCPP_BFLOAT16_T__)
    using bfloat16_t = /* implementation-defined */;
  #endif
}

[編輯] 參考

  • C++23 標準 (ISO/IEC 14882:2024)
  • 17.5 標頭檔案 <stdfloat> 概要 [stdfloat.syn]