• Class / Function / Type

      std::
    • Header file

      <>
    • Other / All

    最終更新日時(UTC):
    が更新

    履歴 編集

    function
    <limits>

    std::numeric_limits::denorm_min

    static T denorm_min() throw();            // (1) C++03
    static constexpr T denorm_min() noexcept; // (1) C++11
    

    概要

    浮動小数点数型において、最小の正の非正規化数(denormalized value)を取得する。

    対応するマクロを次の表に挙げる。

    対応するマクロ
    float FLT_TRUE_MIN
    double DBL_TRUE_MIN
    long double LDBL_TRUE_MIN

    戻り値

    非正規化数をサポートするならば、最小の正の非正規化数。 そうでなければ、最小の正の正規化数。

    例外

    投げない

    #include <iostream>
    #include <limits>
    
    int main()
    {
      constexpr float f = std::numeric_limits<float>::denorm_min();
      constexpr double d = std::numeric_limits<double>::denorm_min();
    
      std::cout << "float : " << f << std::endl;
      std::cout << "double : " << d << std::endl;
    }
    

    出力例

    float : 1.4013e-045
    double : 4.94066e-324
    

    関連項目

    参照