<cmath>
in C++11
supports std::isan()
.
Returns true
if the factor is NaN
, or false
if not.
bool isnan( float arg ); (since C++11)
bool isnan( double arg ); (since C++11)
bool isnan( long double arg ); (since C++11)
According to IEEE standard
,
NaN value
is always false
when comparing NaN value
.
This means that f!=f
is always true
for float/doublef
.
In principle, this method should work for a compiler that follows IEEE floating point
I'm not sure that optimization is followed.
It is recommended that you check and write in advance with the compiler.
610 GDB gets version error when attempting to debug with the Presense SDK (IDE)
578 Understanding How to Configure Google API Key
911 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
572 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
© 2024 OneMinuteCode. All rights reserved.