From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 12FD73858D28; Mon, 8 Apr 2024 08:42:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 12FD73858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712565742; bh=PngejazDlTdfHR1X2C/DKIt/xBlNMLD9+xwThvDpMX8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=p5aMu/4558X54bMbmIcXC5AcU0WPedQAw/Dg7GYLVIN9XYzPWnTqlfiBu+qeTC3Fy VCkyTbj2v0LReXsa/jhYYz64INCUVXsi/iBPxseWNmvNTjvgMDUPu7rY7qhJk27grY jU1NaTf63rI1bu6CpNIct4fRS8P5RfQhyrN1KPCo= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libquadmath/114623] sqrtq and std::numeric_limits<__float128>::max() Date: Mon, 08 Apr 2024 08:42:20 +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: jakub at gcc dot gnu.org 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: cc 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 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #5 from Jakub Jelinek --- (In reply to Andrew Pinski from comment #3) > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D83800#c4 >=20 > Basically libquadmath should be using sqrt128f if it exist for sqrtq inst= ead > of doing a version itself ... That doesn't make any sense. sqrtf128 is only available in recent glibcs, not in any other C library. libquadmath by design contains copies of the (old) glibc IEEE754 quad code,= so that it provides the support independently from the C library. Has been doing t= hat before any *f128 support has been added to glibc, and needs to do it even now to support other C libraries. The sqrt* case was an exception, the glibc sysdeps/ieee754/ldbl-128/ didn't contain any sqrt implementation, as arches which supported ldbl-128 as long double at that point had hw sqrt support, so libquadmath has just an approximation. What could be done is use the soft-fp implementation like is done even in g= libc for x86. We have the soft-fp code in gcc, but would need to arrange the ri= ght sfp-machine.h etc.=