http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57066
Bug #: 57066 Summary: std::logb(-inf) returns wrong value Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: bolero.murak...@gmail.com auto inf = std::numeric_limits<double>::infinity(); std::cout << std::logb(-inf) << std::endl; "-inf" is output. it is wrong. std::logb(-inf) should returns +inf. > F.9.3.11 The logb functions > - logb(±∞) returns +∞.