From nobody Wed Apr 29 16:04:11 2026 X-Original-To: standards@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5MYm0KPXz6bsLp for ; Wed, 29 Apr 2026 16:04:12 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5MYl5DkPz3jN9 for ; Wed, 29 Apr 2026 16:04:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777478651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PXYUqh3oWjS5OYibHUBu7e7/f9XzRvrAlnarjPLQXHc=; b=WT5qF35ZlmtPw3VgIllS7Cr4bdkCpaw8usnQdzr8tmNn+fkDxyFLqDDGYm5TkTe8sCio/k zYMQ4my1zOM2HJx7Wh7/pojSM9HS/7+uMJIpFKjfpj0c3bs4ekBlf0t6L3eU4bW2cZIIft lxIUu/RVwOn+MvbvO0IFenPHKMQFKRYMsNPSn/otOm0Gtmr/lToqgR0QxUMOLEarzuFOJ8 igjyl6/5KMx0NVNJ//MsDLnwQvocBmY082dHC/Z+hmR9hI9ETUUlSiqzt945WNjfULVD0T cVI1JKP+GBAfqlFtEuSfNflMWo9PPNnwU/dj0BFRIl6DqoA8rEUqbXLWhKg4qA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777478651; a=rsa-sha256; cv=none; b=Tgzqg2VRMs/Wnb0Ymh7CBRxMx5Be5B9XWz3RWsmw8ErTTug6aJle21ztT3D+j5ONCXlzoc TQI+I5gL37QHv5qqtrIg4URGVDg7LUMpy2PlWRat2hH9gki/yDZc+SbDCWQSYag+ZwYjLK Ie7RgqsqhkeI4dNkJSfP0UJmoP5a8F8lfqRFJv6cTE1Ykyim0h6hIOnK0xUAeaH6wll+l5 DW9OLU9tERcausBCA8x7cjWstwvnxeohcmpGFZdg0J+FTQ+RrQBMvhL7CFzD9FwSEMWG2C t/D/9aeE5Rz52co/qeFLURKr8LNr6G3YY2UFDNK51ewn4yTmwenjThSKZnarig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777478651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PXYUqh3oWjS5OYibHUBu7e7/f9XzRvrAlnarjPLQXHc=; b=JQJzuIxQ11lVzMg0Qv9dlgwWcyp5ftx60sFopwgVzBmOwKxMzKtbObFs2ABMiROfjIBzwy msimKfhjnL4XmthI6eXXL3o5YbQqG7jvfxODgMGrfoJSpF7lVbbgkufqLr9GlrfcYfMH2u lNF7kMFEiM5151HjbZOrnsFQaNRpM/BurjfxKTAzo9CkA6O+T1aU75dAnUOtA2NQ2e4ZhH kAgeSQ4Tk15+PETYyFeptJyoP2tvDXqOiPR1akLB3H8apVhyd5TstfGg0eUpAGkV6HFJsS 89imGYMvJtaaJaOD4eIVNWDeLrSFRQjcOsnkDf7bl7zmdkrXPHoqAJ7HDBR9Tw== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4g5MYl4rQ6znMC for ; Wed, 29 Apr 2026 16:04:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 63TG4BNi008660 for ; Wed, 29 Apr 2026 16:04:11 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 63TG4BZf008658 for standards@FreeBSD.org; Wed, 29 Apr 2026 16:04:11 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: standards@FreeBSD.org Subject: [Bug 294719] lib/msun: Added fmaximum_mag_num Date: Wed, 29 Apr 2026 16:04:11 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: kargl@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: standards@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.mimetype attachments.created Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Standards compliance List-Archive: https://lists.freebsd.org/archives/freebsd-standards List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-standards@freebsd.org Sender: owner-freebsd-standards@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D294719 Steve Kargl changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #270243|text/x-csrc |text/plain mime type| | --- Comment #10 from Steve Kargl --- Created attachment 270243 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D270243&action= =3Dedit bit-twiddling implementation and test program (In reply to Robert Clausecker from comment #9) I thought I replies yesterday. Anyway, here's the bit twiddling for fmaxium_numf(). AFAICT, it meets the 'make it work. make it correct.' criteria. A full self-contained test code, which works on x86_64, is attached as h4.c. /* * Return the number if one argument is a number and the other is * a qNaN or sNaN. If both arguments are NaNs, a quiet NaN is returned. * If an argument is a sNaN, the "invalid" floating-point exception * is raised (even though the function returns the number when the other * argument is a number. */ float fmaximum_numf(float x, float y) { uint32_t hx, hy, ux, uy; GET_FLOAT_WORD(hx, x); ux =3D hx & 0x7fffffff; GET_FLOAT_WORD(hy, y); uy =3D hy & 0x7fffffff; if (ux > 0x7f800000) { /* x is NaN. */ if (uy > 0x7f800000) /* y is NaN. */ return (x + y); /* Return qNaN, raise FE_INVALID. */ if (ux < 0x7fc00000) /* x is sNaN. */ feraiseexcept(FE_INVALID); return (y); } if (uy > 0x7f800000) { /* y is NaN */ if (uy < 0x7fc00000) /* y is sNaN */ feraiseexcept(FE_INVALID); return (x); } return (((hx >> 31) < (hy >> 31)) || y < x ? x : y); } --=20 You are receiving this mail because: You are the assignee for the bug.=