From nobody Mon Dec 13 02:22:23 2021 X-Original-To: freebsd-current@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 93A2018E49BE; Mon, 13 Dec 2021 02:22:31 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (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 (2048 bits) client-digest SHA256) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JC4zB3Yk6z4Vst; Mon, 13 Dec 2021 02:22:30 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.16.1/8.16.1) with ESMTPS id 1BD2MN81041496 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sun, 12 Dec 2021 18:22:23 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.16.1/8.16.1/Submit) id 1BD2MN7g041495; Sun, 12 Dec 2021 18:22:23 -0800 (PST) (envelope-from sgk) Date: Sun, 12 Dec 2021 18:22:23 -0800 From: Steve Kargl To: Mark Murray Cc: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org Subject: Re: What to do about tgammal? Message-ID: <20211213022223.GA41440@troutmask.apl.washington.edu> References: <20211204185352.GA20452@troutmask.apl.washington.edu> List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4JC4zB3Yk6z4Vst X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=washington.edu (policy=none); spf=none (mx1.freebsd.org: domain of sgk@troutmask.apl.washington.edu has no SPF policy when checking 128.95.76.21) smtp.mailfrom=sgk@troutmask.apl.washington.edu X-Spamd-Result: default: False [-2.00 / 15.00]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; DMARC_POLICY_SOFTFAIL(0.10)[washington.edu : No valid SPF, No valid DKIM,none]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-1.00)[-0.997]; NEURAL_HAM_SHORT(-1.00)[-1.000]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:73, ipnet:128.95.0.0/16, country:US]; SUBJECT_ENDS_QUESTION(1.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N On Sat, Dec 04, 2021 at 11:48:13PM +0000, Mark Murray wrote: > > > > On 4 Dec 2021, at 18:53, Steve Kargl wrote: > > > > > > So, is anyone interested in seeing a massive patch? > > Me, please! > So, I have the ld80 case working. I'll open a PR if on does not exist. The pr will contain 1) Diff for nonfunctional changes to code for tgamma(x). This is a re-organization of the code so I could reverse it. Some cleanup of comments and documentations. A move towards style(9) 2) Advice on what to do about tgammal(x) on ld128 hardware. Essentially, need to do the git equivalent of 'svn mv imprecise.c ld128/b_tgammal.c. 3) Diff with the new code for ld80 tgamma. Interval tested for tgammal: [6,1755.1] 5000000 calls, 2.056068 secs, 0.41121 usecs/call ulp <= 0.5: 90.233% 4511666 | 90.233% 4511666 0.5 < ulp < 0.6: 7.061% 353033 | 97.294% 4864699 0.6 < ulp < 0.7: 2.393% 119644 | 99.687% 4984343 0.7 < ulp < 0.8: 0.300% 14981 | 99.986% 4999324 0.8 < ulp < 0.9: 0.014% 676 | 100.000% 5000000 Max ulp: 0.873414 at 1.480588145237629047468e+03 Interval tested for tgammal: [1.0662,6] 5000000 calls, 0.748966 secs, 0.14979 usecs/call ulp <= 0.5: 96.355% 4817737 | 96.355% 4817737 0.5 < ulp < 0.6: 3.291% 164534 | 99.645% 4982271 0.6 < ulp < 0.7: 0.328% 16403 | 99.973% 4998674 0.7 < ulp < 0.8: 0.026% 1297 | 99.999% 4999971 0.8 < ulp < 0.9: 0.001% 29 | 100.000% 5000000 Max ulp: 0.861508 at 1.999467927053585410537e+00 Interval tested for tgammal: [1.01e-17,1.0661] 5000000 calls, 0.904246 secs, 0.18085 usecs/call ulp <= 0.5: 96.201% 4810043 | 96.201% 4810043 0.5 < ulp < 0.6: 3.297% 164875 | 99.498% 4974918 0.6 < ulp < 0.7: 0.412% 20581 | 99.910% 4995499 0.7 < ulp < 0.8: 0.082% 4108 | 99.992% 4999607 0.8 < ulp < 0.9: 0.008% 389 | 100.000% 4999996 0.9 < ulp < 1.0: 0.000% 4 | 100.000% 5000000 Max ulp: 0.938041 at 1.023286481537296307856e+00 Interval tested for tgammal: [-1.9999,-1.0001] 5000000 calls, 1.740820 secs, 0.34816 usecs/call ulp <= 0.5: 56.596% 2829776 | 56.596% 2829776 0.5 < ulp < 0.6: 8.616% 430793 | 65.211% 3260569 0.6 < ulp < 0.7: 7.452% 372621 | 72.664% 3633190 0.7 < ulp < 0.8: 6.250% 312511 | 78.914% 3945701 0.8 < ulp < 0.9: 5.147% 257372 | 84.061% 4203073 0.9 < ulp < 1.0: 4.100% 205010 | 88.162% 4408083 1.0 < ulp < 1.5: 9.846% 492324 | 98.008% 4900407 1.5 < ulp < 2.0: 1.790% 89514 | 99.798% 4989921 2.0 < ulp < 3.0: 0.201% 10074 | 100.000% 4999995 3.0 < ulp < 0.0: 0.000% 5 | 100.000% 5000000 -- Steve