From owner-freebsd-numerics@freebsd.org Tue Nov 7 10:39:04 2017 Return-Path: Delivered-To: freebsd-numerics@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 778B7E54E05 for ; Tue, 7 Nov 2017 10:39:04 +0000 (UTC) (envelope-from dimpase@gmail.com) Received: from mail-wm0-x232.google.com (mail-wm0-x232.google.com [IPv6:2a00:1450:400c:c09::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 06567782DF for ; Tue, 7 Nov 2017 10:39:04 +0000 (UTC) (envelope-from dimpase@gmail.com) Received: by mail-wm0-x232.google.com with SMTP id r68so2768699wmr.3 for ; Tue, 07 Nov 2017 02:39:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=7wTnPdG3S/gop3YBebaVo1rc2nrLcpSukWecaAxqj7A=; b=n/AJKfsMoQsTLyjO5K9ZEZS6kJQK1mrLaImoBdQjoXHJnZ5/3W3LBSZ4/nMcqalFyG Tnpib1/gq8wwQGKsnCGuqbmiHR0u+5uA/XL9evD+uIRmr6BdE+jIf9XPWuuR/hS9lEBH AXBz0l7Jdnp1LDudRjUgkR8PV93+ZLzxU7pyK8/lViYTmaHgl300wDFcax2udXuV9P6s gPLkN0+8TwNgYsDb/m9t0Awn4skhT4Wteg369UC7O4Md1ml2L/WiTnQN8MxfHqdMzkMF ZE9oCblRyqUAWa5zZPt74BSBkEBYoPM70n4wPBhYtY/F4NoDyyLLV86hctmrXPws3EWe OA0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=7wTnPdG3S/gop3YBebaVo1rc2nrLcpSukWecaAxqj7A=; b=jWmOqNTPI3cj910Ji70MMnDTUK7D6lWBse7/oQLd5ao6FmVfhyB4iejVyHxslor0GP CHEpdNOVkg3GgGvEWbsSAzqeGdVfKdPVNh/W+9/wq/1P8mnSxJM//t4aqIvSVNOwHB7M 2wwzknJbwSrNVllKhfQvz3ACiwYPxBiskyEe0b7iR3+hxQy2L8LQxSnR0ntuux8i2N/l Fd4t5aNZ+d06tT7ELSBRrBYtInG4sqVk7VqTh1xvJM/0OOWAoH50koozgVOnBLewkAKh J/u64xrkyemf/HdtlRV5HhFPsDiIFH5mBijjYM8U/q0s34ucw4/fqsG/810hiltLaejX MOdg== X-Gm-Message-State: AJaThX5q0EfUdAY5SNgS5gyta/iXVml/Ll7OxQ4vcBaNFg3lWURwYpHu 2L5+isu0p0X3iUwhpND+6NbIiRuz X-Google-Smtp-Source: ABhQp+SFXNedc58c+JCTvMdn7PkGNo4XnEa6fUPM9n1vPCKvg8i0fRfO2g1MRt39TXjfPfbJeCh8tw== X-Received: by 10.28.5.148 with SMTP id 142mr1030147wmf.142.1510051142256; Tue, 07 Nov 2017 02:39:02 -0800 (PST) Received: from hilbert.cs.ox.ac.uk (cpc69402-oxfd27-2-0-cust392.4-3.cable.virginm.net. [82.14.197.137]) by smtp.gmail.com with ESMTPSA id 69sm2274422wmp.37.2017.11.07.02.39.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Nov 2017 02:39:00 -0800 (PST) From: dimpase@gmail.com X-Google-Original-From: dimpase+freebsd@gmail.com Received: by hilbert.cs.ox.ac.uk (Postfix, from userid 1000) id D73E174E96E; Tue, 7 Nov 2017 10:38:59 +0000 (GMT) Date: Tue, 7 Nov 2017 10:38:59 +0000 To: Steve Kargl Cc: Michael Danilov , freebsd-numerics@freebsd.org Subject: Re: cpow and clog Message-ID: <20171107103858.GA8468@hilbert> References: <20171106194937.GA87725@freebird> <20171106204121.GB37361@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171106204121.GB37361@troutmask.apl.washington.edu> X-PGP-Key: http://keys.gnupg.net/pks/lookup?op=vindex&search=dimpase@cs.ox.ac.uk User-Agent: Mutt/1.8.3 (2017-05-23) X-BeenThere: freebsd-numerics@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Discussions of high quality implementation of libm functions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Nov 2017 10:39:04 -0000 On Mon, Nov 06, 2017 at 12:41:21PM -0800, Steve Kargl wrote: > On Mon, Nov 06, 2017 at 08:49:43PM +0100, Michael Danilov wrote: > > I would like to have some feedback on my attempt to import OpenBSD > > code for cpow and clog: > > > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221341 > > https://bugs.freebsd.org/bugzilla/attachment.cgi?id=187693 > > > > What happened to the alternative implementation mentioned in the thread below? > > bde has an implementation of clog[fl]. He may someday > commit it. I don't know if anyone ever worked on cpow[fl]. > I stopped working on powl and tgammal when I returned my > commit bit due to differences with "higher-ranking" committers. > > > And what had stopped the developers from just reusing the Net-i > > or OpenBSD code? > > How have you tested the NetBSD and/or OpenBSD code? What is the > quality? Have the long double clogl and cpowl been tested on both > ld80 and ld128 hardware? See FreeBSD's lib/msun/src/math_private.h > for a discussion of possible issues of using I from complex.h in this > code. I would like to point out that various FreeBSD ports already contain implementations of the functions in question. For instance, the current numpy includes these implementations - they say it's taken from msun's FreeBSD back in 2013, mostly (sic!). https://github.com/numpy/numpy/blob/master/numpy/core/src/npymath/npy_math_complex.c.src Another such port, semi-obsolete, is sage (a.k.a. sagemath), something that I am keen on reviving. I am sure there are more such ports (e.g. in the C++-land), surely you ought to know better. Sorry for being blunt, but IMHO the attitude on this list appears to be to let the numerics stack on FreeBSD die a slow death. Indeed, most people hate to reinvent the wheel. It's really no fun at all to scramble to get these missing implementations somehow, there are certainly much better ways to use one's time and brainpower. On this list people prefer to point at some private code in uncertain shape, and hope that somehow by some magic FreeBSD will have the best humanely possible implementation of the complex transcendental functions... Why don't you first of all try to provide *some* reasonably working implementation (thus allowing porters not to have to reinvent this wheel, badly, for $n$-th time over, and then having *fun* making sure the tools know where to get these functions), and only then try to improve it? Cheers, Dima http://users.ox.ac.uk/~coml0531/ > > > Far as I see, FreeBSD's msun source resembles those other libm's a > > lot anyway? > > Well, of course, the various libm's look alike. They all started > life from Sun Microsystems fdlibm code. You can get the last > release from Netlib. > > http://www.netlib.org/fdlibm/index.html > > -- > Steve > _______________________________________________ > freebsd-numerics@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-numerics > To unsubscribe, send any mail to "freebsd-numerics-unsubscribe@freebsd.org"