From owner-freebsd-ports@freebsd.org Fri Apr 12 19:19:45 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 5910E158406F for ; Fri, 12 Apr 2019 19:19:45 +0000 (UTC) (envelope-from dimpase@gmail.com) Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C506A89144 for ; Fri, 12 Apr 2019 19:19:43 +0000 (UTC) (envelope-from dimpase@gmail.com) Received: by mail-lf1-x12e.google.com with SMTP id h5so5388538lfm.1 for ; Fri, 12 Apr 2019 12:19:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=iMb8t6D8qiXOkX42f+PM/6+ixbY97aHEsaTg4WNrX2g=; b=Nr6qr0K9+tiVogvfzhiyM/o6OqJjVr2YcXMt3lsoR8xJGc0+86Rouh83kEiw5P1PkU QJZGqt5uyYm3X1mPvbQheIplIrPmU13Ee9GAqtpp2DBKcV1QzMS3vmEH4HS/sfo5EZPg loPqwazNBfPNNx+lvAN2ZtPTi5CeydFnMEtPr01V16f8BoiuRuH8KeFNgTosPlfD484m BKnao0xQrmDEFVZw1M7hHCpTuvdvZ4xccgtBWlDrGdo8v/eUHG5GnRFp3+jMM26sN/Lf HLKoid0IZvglIFn8mNEn0AT9LT9J22TBKEzPdji9T+Or7T59YczWf52eG/G1/WPrsmpD OKcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=iMb8t6D8qiXOkX42f+PM/6+ixbY97aHEsaTg4WNrX2g=; b=U+I8qYvkTd673WY09oCw++UduvL4EMVZZV3ARwCDtfGwXOUEz7+v4VmMe4k3l8drGP iTiTu0Nl6tI4i0XtPMx0z9OECcmdiaomPzeySv4e2sc15cfFB9jk++cRjuy11L8N/O/v pVlCQbBayWarVNRIPY599wkZUVe4TWY6FG5ZBVCpGMLLc1vxsFkoCKdfOfGu6/jDDJEq d7R0JXAhbg19DD2UfGFZN33OZIfOD9PeSabuqVVBAiF5oJn/+HJdign+GicVD3oI/GI1 OmphKlHi+HJFQlT9ZI9ZgamRvfye+MigZCnFW+rMwYEO893liLZlo994SByFtnyRdOKx F8JA== X-Gm-Message-State: APjAAAVGlPLPIkqs/9Su6idhF3XU3Z/0hdW4wbhC2W9gVQWduhZmGHca yPVlmrDp0NdPokaxwQFwscIRcC/f8MzvzH7q6GmzlZdBfqQ= X-Google-Smtp-Source: APXvYqzTyPLGNdjvW4ThdRHYcBXNGNcxO26NWvQ6Z9gHjAdaji+9bUle/eR1y+4OeLrAL7FIF+CDJkgmWJDByDe9FT4= X-Received: by 2002:a19:9f53:: with SMTP id i80mr17360390lfe.133.1555096782112; Fri, 12 Apr 2019 12:19:42 -0700 (PDT) MIME-Version: 1.0 References: <20190412161112.GA5963@troutmask.apl.washington.edu> <20190412161742.GA21349@troutmask.apl.washington.edu> <20190412162810.GA24821@troutmask.apl.washington.edu> In-Reply-To: <20190412162810.GA24821@troutmask.apl.washington.edu> From: Dima Pasechnik Date: Fri, 12 Apr 2019 21:19:30 +0200 Message-ID: Subject: Re: Default python is 3.6? To: Steve Kargl Cc: FreeBSD Ports Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: C506A89144 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=Nr6qr0K9; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of dimpase@gmail.com designates 2a00:1450:4864:20::12e as permitted sender) smtp.mailfrom=dimpase@gmail.com X-Spamd-Result: default: False [-5.68 / 15.00]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.88)[-0.880,0]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(-2.79)[ip: (-9.30), ipnet: 2a00:1450::/32(-2.38), asn: 15169(-2.18), country: US(-0.06)]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[freebsd]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-ports@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[e.2.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; SUBJECT_ENDS_QUESTION(1.00)[]; RCVD_COUNT_TWO(0.00)[2]; 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 19:19:45 -0000 On Fri, Apr 12, 2019 at 6:29 PM Steve Kargl wrote: > > 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. > This one is fixed in Python 3.7: https://github.com/python/cpython/blob/3.7/Modules/mathmodule.c via this commit: https://github.com/python/cpython/commit/4e6646fef5d2cc53422e4eca0b18201ed5a5c4b6 It is also fixed in Python 2.7. See https://github.com/python/cpython/pull/12027 for details. I've just asked whether upstream will consider backporting this to Python 3.5 and 3.6. If not, it would need to be done in FreeBSD only. > > > --- 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 > _______________________________________________ > freebsd-ports@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-ports > To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org"