[Bug c++/57066] New: std::logb(-inf) returns wrong value
bolero.murakami at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Apr 25 07:01:00 GMT 2013
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: unassigned@gcc.gnu.org
ReportedBy: bolero.murakami@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 +∞.
More information about the Gcc-bugs
mailing list