Why does value change when static_casting?

  c++
int main(){
double i = static_cast<double>(static_cast<int>((273.15)*100))/100;
std::cout<<(i==273.14); //1
return 0;
}

i equals to 273.14 and I can’t understand why

Source: Windows Questions C++

LEAVE A COMMENT