From nobody Thu Aug 22 22:23:07 2024 X-Original-To: bugs@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 4Wqd4r1qpKz5TlGP for ; Thu, 22 Aug 2024 22:23:08 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wqd4q6Zbbz4k3H for ; Thu, 22 Aug 2024 22:23:07 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1724365387; a=rsa-sha256; cv=none; b=ZwYycDpNE/it+5liZ+A0cbPQLOefSIlf7ipIZxWtgZajOH4DW1KKdHQT9bkA0HsAIia2pw G6q/6s0xJRtrVJl8Dz8miRuka2FxYclh8vgjWWGnBBDPoAScJ+us2sKmsGZMwmfsJo2PVp eUt/nTHGm7blyjHVBQJ2+fShsk5k7HS/ftmVCZ5gNzXviRFZpkARQri8n96vev0ThZ8ISc lOWdZZrGRTTVvtp4u9LkM9vWF44LNVFwDCpH4MfLVMkicqMr1ZUP5NYLuLsfCjhBvM38Ic S+69mgtTFREpq/wfCQjn06jx627du5FMd71kkY+0i5MvhPYWG5MMy8JkOdVYEg== 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=1724365387; 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; bh=uxQtWI596vTTVyv+dhDRdoZRORAH8N4hknk0uDlxD3o=; b=UO9HkJbiZjPGlXAEsX2j4Ax7tOzeEtHpM/48G0lyw+aHQqWrvjQv6FWCQOfSX7aN0jhe3u NN4BlRw9cppPnKoiWmPMb5qhxjeJBTcUQmIcDJIinzSTkSASBmlJKpjaDowEGFTL5Crk/o Frvo/bbVCVxNr9zRTNyhLBTl8a96JvANLLal8nommdpIa6kwPJQjYjjQKukrKKOC3+UygA w+8N5o57ctyg8ZuU/JsI58JdMCF/2Z47pi2321np5k0BF9yYxeqoIr7S5rBWQt+hjFMZAO ffldCFDiM/Bj61c3azZXoOGIaQW/+9yZgaE1APoD1NcbyiDvMHOpUMIISgKSGA== 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 4Wqd4q6CDTzl8G for ; Thu, 22 Aug 2024 22:23:07 +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 47MMN7JC027807 for ; Thu, 22 Aug 2024 22:23:07 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 47MMN7JE027805 for bugs@FreeBSD.org; Thu, 22 Aug 2024 22:23:07 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: bugs@FreeBSD.org Subject: [Bug 281001] Improve accuracy of asinf(x) Date: Thu, 22 Aug 2024 22:23:07 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: kargl@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D281001 Bug ID: 281001 Summary: Improve accuracy of asinf(x) Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: kargl@FreeBSD.org Created attachment 253025 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D253025&action= =3Dedit patch to lib/msun/src/e_asinf.c The attached patch improves the accuracy of asinf(x). It contains a better rational approximation. For exhaustive testing in the interval, the current libm gi= ves % ./tlibm asin -fPED -x 0x1p-12f -X 1 Interval tested for asinf: [0.000244141,1] ulp <=3D 0.5: 97.916% 98564994 | 97.916% 98564994 0.5 < ulp < 0.6: 2.038% 2051023 | 99.953% 100616017 0.6 < ulp < 0.7: 0.047% 47254 | 100.000% 100663271 0.7 < ulp < 0.8: 0.000% 25 | 100.000% 100663296 Max ulp: 0.729891 at 5.00732839e-01 which isn't too bad given that much of the computation is actually done in double floating point. With the new rational approximation, exhaustive testing yields % ./tlibm asin -fPED -x 0x1p-12f -X 1 Interval tested for asinf: [0.000244141,1] ulp <=3D 0.5: 99.711% 100372643 | 99.711% 100372643 0.5 < ulp < 0.6: 0.288% 290357 | 100.000% 100663000 0.6 < ulp < 0.7: 0.000% 296 | 100.000% 100663296 Max ulp: 0.636344 at 5.09706438e-01 That is, it's better. --=20 You are receiving this mail because: You are the assignee for the bug.=