https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68424
Bug ID: 68424 Summary: static_cast<int>(0.29 * 100) == "28" Product: gcc Version: 4.9.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: alex.piliev at gmail dot com Target Milestone: --- On my system (Debian 8 Jessie x64) with g++ (Debian 4.9.2-10) this code: std::cout << static_cast<int>(0.28 * 100) << std::endl; std::cout << 0.29 * 100 << std::endl; std::cout << static_cast<int>(0.29 * 100) << std::endl; std::cout << static_cast<int>(0.30 * 100) << std::endl; produces the following output: 28 29 28 30