• Class / Function / Type

      std::
    • Header file

      <>
    • Other / All

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

    履歴 編集

    macro
    <cmath>

    FP_ZERO

    # define FP_ZERO integer_constant_expression
    

    概要

    浮動小数点数が(正または負の) 0 であることを表す整数定数式。

    備考

    このマクロの値は、std::fpclassify において、引数が正、あるいは、負のゼロである場合に、戻り値として使用される。

    #include <iostream>
    #include <cmath>
    
    int main()
    {
      std::cout << std::boolalpha;
      std::cout << (std::fpclassify(0.0) == FP_ZERO) << std::endl;
    }
    

    出力例

    true
    

    バージョン

    言語

    • C++11