Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tsutaj committed Apr 14, 2024
1 parent 66b5e8e commit f447831
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions math/math_000_limits.cpp
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
#include <climits>
#include <cfloat>

[int]
INT_MIN ~ INT_MAX
-2^312^31 - 1
-21474836482147483647
// [int]
// INT_MIN ~ INT_MAX
// -2^31 ~ 2^31 - 1
// -2147483648 ~ 2147483647

[unsigned int]
0 ~ UINT_MAX
02^32 - 1
04294967295
// [unsigned int]
// 0 ~ UINT_MAX
// 0 ~ 2^32 - 1
// 0 ~ 4294967295

[long long]
LLONG_MIN ~ LLONG_MAX
-2^632^63 - 1
-92233720368547758089223372036854775807
// [long long]
// LLONG_MIN ~ LLONG_MAX
// -2^63 ~ 2^63 - 1
// -9223372036854775808 ~ 9223372036854775807

[unsigned long long]
0 ~ ULONG_MAX
02^64 - 1
018446744073709551615
// [unsigned long long]
// 0 ~ ULONG_MAX
// 0 ~ 2^64 - 1
// 0 ~ 18446744073709551615

[float] ※ 単精度
FLT_MIN ~ FLT_MAX
1.175494351e-38F3.402823466e+38F
// [float] ※ 単精度
// FLT_MIN ~ FLT_MAX
// 1.175494351e-38F ~ 3.402823466e+38F

[double] ※ 倍精度
DBL_MIN ~ DBL_MAX
2.2250738585072014e-3081.7976931348623158e+308
// [double] ※ 倍精度
// DBL_MIN ~ DBL_MAX
// 2.2250738585072014e-308 ~ 1.7976931348623158e+308

[long double]
LDBL_MIN ~ LDBL_MAX
環境によって変化するが、double型よりも精度が良い場合がほとんど。
// [long double]
// LDBL_MIN ~ LDBL_MAX
// 環境によって変化するが、double型よりも精度が良い場合がほとんど。

0 comments on commit f447831

Please sign in to comment.