I have some problems understanding the following code:
double a = -1000; double b = numeric_limits<double>::min(); if (a < b) { cout << "why?"; }
And the result:
why?
How can -1000 be lower than numeric_limits<double>::min() ?
-1000
numeric_limits<double>::min()
This is because numeric_limits<double>::min(); is the lowest positive number expressed in double precision with a floating point, and not in the most negative number.
numeric_limits<double>::min();
Source: https://habr.com/ru/post/1236466/More articles:VS Code launch.json saves reselling after debugging - debuggingC ++ Best Coding Practice - c ++PHP PDOException: SQLSTATE [HY000] [2019] Unable to initialize utf8mb4 character set - mysqlEnable HTTP 2.0 for Undertow in Spring Boot - javaDraw a video on HTML5 canvas - javascriptFatal Mac OS 10.9 error: file "tr1 / unordered_map" not found - command-line-toolDo I have to use `jpm run` every time I change the Firefox add-on I'm developing? - firefoxApple Pay Detective Wallet Does Not Have Credit Cards - iosWhat do triple points (...) do in julia array? Why do they change the type signature? - julia-langPKPaymentAuthorizationViewController is present as a nil view controller - ios8All Articles