[英]C++ standard library constants for big and small numbers?
C ++ std lib中有一個常量,意味着“最大可表示數”和“最小可表示數”嗎? 在Matlab中,我們有像EPS
, realmax
和realmin
這樣的東西。 我想知道是否有相當於C ++的東西。
在限制標題中,您可以找到最大和最小的模板化函數,
std::numeric_limits<TYPE>::max();
std::numeric_limits<TYPE>::min();
以下是一些參考: http : //www.cplusplus.com/reference/std/limits/numeric_limits/
在這里你可以找到現代的方式:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.