From owner-freebsd-ports@freebsd.org Fri Apr 12 16:28:14 2019 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF24D1580BE8 for ; Fri, 12 Apr 2019 16:28:14 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 91822824D0 for ; Fri, 12 Apr 2019 16:28:12 +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.15.2/8.15.2) with ESMTPS id x3CGSA3S033916 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Fri, 12 Apr 2019 09:28:10 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id x3CGSAl6033915 for freebsd-ports@freebsd.org; Fri, 12 Apr 2019 09:28:10 -0700 (PDT) (envelope-from sgk) Date: Fri, 12 Apr 2019 09:28:10 -0700 From: Steve Kargl To: freebsd-ports@freebsd.org Subject: Re: Default python is 3.6? Message-ID: <20190412162810.GA24821@troutmask.apl.washington.edu> Reply-To: sgk@troutmask.apl.washington.edu References: <20190412161112.GA5963@troutmask.apl.washington.edu> <20190412161742.GA21349@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190412161742.GA21349@troutmask.apl.washington.edu> User-Agent: Mutt/1.11.2 (2019-01-07) X-Rspamd-Queue-Id: 91822824D0 X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [2.23 / 15.00]; HAS_REPLYTO(0.00)[sgk@troutmask.apl.washington.edu]; IP_SCORE(0.01)[ip: (0.08), ipnet: 128.95.0.0/16(0.08), asn: 73(-0.05), country: US(-0.06)]; TO_DN_NONE(0.00)[]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; RCVD_IN_DNSWL_MED(-0.20)[21.76.95.128.list.dnswl.org : 127.0.11.2]; MX_GOOD(-0.01)[cached: troutmask.apl.washington.edu]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:73, ipnet:128.95.0.0/16, country:US]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.56)[-0.561,0]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.30)[0.296,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-ports@freebsd.org]; DMARC_NA(0.00)[washington.edu]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+]; NEURAL_SPAM_LONG(0.79)[0.791,0]; R_SPF_NA(0.00)[]; RCVD_TLS_LAST(0.00)[] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2019 16:28:14 -0000 On Fri, Apr 12, 2019 at 09:17:42AM -0700, Steve Kargl wrote: > > % find . -name math\* > ./work/Python-3.6.8/Doc/library/math.rst > ./work/Python-3.6.8/Modules/mathmodule.c > ./work/Python-3.6.8/Lib/test/math_testcases.txt > ./work/stage/usr/local/lib/python3.6/test/math_testcases.txt > Well, this one is easy to fix. I've sent this patch for 2 to 3 years now. I've opened a PR about it. Someday you guys might actually fix this, because I will contacting core to get my commit bit back. --- work/Python-3.6.8/Modules/mathmodule.c.orig 2019-04-12 09:23:42.329350000 -0700 +++ work/Python-3.6.8/Modules/mathmodule.c 2019-04-12 09:24:37.977029000 -0700 @@ -67,7 +67,7 @@ static const double logpi = 1.144729885849400174143427351353058711647; static double -sinpi(double x) +_freebsd_ports_are_broken_sinpi(double x) { double y, r; int n; @@ -296,7 +296,7 @@ integer. */ if (absx > 200.0) { if (x < 0.0) { - return 0.0/sinpi(x); + return 0.0/_freebsd_ports_are_broken_sinpi(x); } else { errno = ERANGE; @@ -320,7 +320,7 @@ } z = z * lanczos_g / y; if (x < 0.0) { - r = -pi / sinpi(absx) / absx * exp(y) / lanczos_sum(absx); + r = -pi / _freebsd_ports_are_broken_sinpi(absx) / absx * exp(y) / lanczos_sum(absx); r -= z * r; if (absx < 140.0) { r /= pow(y, absx - 0.5); @@ -390,7 +390,7 @@ r += (absx - 0.5) * (log(absx + lanczos_g - 0.5) - 1); if (x < 0.0) /* Use reflection formula to get value for negative x. */ - r = logpi - log(fabs(sinpi(absx))) - log(absx) - r; + r = logpi - log(fabs(_freebsd_ports_are_broken_sinpi(absx))) - log(absx) - r; if (Py_IS_INFINITY(r)) errno = ERANGE; return r; -- Steve