名稱空間
變體
操作

std::float_round_style

來自 cppreference.com
< cpp‎ | 型別‎ | 數值限制
 
 
 
 
 
定義於標頭檔案 <limits>
enum float_round_style {

    round_indeterminate       = -1,
    round_toward_zero         = 0,
    round_to_nearest          = 1,
    round_toward_infinity     = 2,
    round_toward_neg_infinity = 3

};

型別為 std::float_round_style 的列舉常量表示浮點算術在表示式結果儲存到浮點型別物件時使用的舍入樣式。這些值是:

[編輯] 列舉常量

名稱 定義
std::round_indeterminate 舍入樣式無法確定
std::round_toward_zero 向零舍入
std::round_to_nearest 向最近的可表示值舍入
std::round_toward_infinity 向正無窮大舍入
std::round_toward_neg_infinity 向負無窮大舍入

[編輯] 參閱

[靜態]
確定該型別所用的舍入樣式
(public static member constant) [編輯]
浮點舍入方向
(macro constant) [編輯]