From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2E9283858C35; Sun, 7 Apr 2024 04:22:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2E9283858C35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712463777; bh=Yjub7/c6/Cta46I2yA7zl+sT4RRij2ZpwjKGTAo1d1E=; h=From:To:Subject:Date:In-Reply-To:References:From; b=WI/rIfopxdb2xL6uCf/4OKnME5w2h1rtO8XBznicNG5zwp0cF3vYNchWvho4Da0Lw Ypsp/0geSCnF7JSfuRtzbgNwctyRzIidb1Up5WUnor8f0Y1MVWL/3eCzf8gUAkUr0W 6n/dMTGOknA3JjuzCT9B3+afHs6aoUQtGaDvpqfo= From: "g.peterhoff@t-online.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug libquadmath/114623] sqrtq and std::numeric_limits<__float128>::max() Date: Sun, 07 Apr 2024 04:22:56 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libquadmath X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: g.peterhoff@t-online.de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114623 --- Comment #2 from g.peterhoff@t-online.de --- #include #include #include #include #include #include #include void print_hex(const std::float128_t value) { std::array buffer{}; const std::to_chars_result result{std::to_chars(buffer.data(), buffer.data()+buffer.size(), value, std::chars_format::hex)}; std::cout << std::string_view{buffer.data(), result.ptr} << std::en= dl; } template void print_sqrt_max_hex() { using limits =3D std::numeric_limits; print_hex(std::sqrt(limits::max())); } int main() { print_sqrt_max_hex(); print_sqrt_max_hex<__float128>(); return EXIT_SUCCESS; } gets 1.ffffffffffffffffffffffffffffp+8191 1p+8192=