From owner-freebsd-current@freebsd.org Sun Jul 15 21:13:18 2018 Return-Path: Delivered-To: freebsd-current@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 A4C5C102A14C; Sun, 15 Jul 2018 21:13:18 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 30AF670EAC; Sun, 15 Jul 2018 21:13:18 +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 w6FLBxuO033118 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 15 Jul 2018 14:11:59 -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 w6FLBxtn033117; Sun, 15 Jul 2018 14:11:59 -0700 (PDT) (envelope-from sgk) Date: Sun, 15 Jul 2018 14:11:59 -0700 From: Steve Kargl To: Matthew Macy Cc: "Montgomery-Smith, Stephen" , Warner Losh , Cy Schubert , Ian Lepore , "K. Macy" , FreeBSD Current , "freebsd-numerics@freebsd.org" Subject: Re: [PATCH] Recent libm additions Message-ID: <20180715211159.GB32747@troutmask.apl.washington.edu> Reply-To: sgk@troutmask.apl.washington.edu References: <20180715184255.4965AE50@spqr.komquats.com> <4c91b1a4-ecaa-337e-c6d3-89e9d4fcaf83@missouri.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2018 21:13:18 -0000 On Sun, Jul 15, 2018 at 02:00:37PM -0700, Matthew Macy wrote: > On Sun, Jul 15, 2018 at 12:43 PM, Montgomery-Smith, Stephen > wrote: > > On 07/15/2018 02:09 PM, Warner Losh wrote: > >> I'm not saying that he has a lock. I'm saying he's are domain expert and > >> many mistakes can be avoided by talking to him. > >> > >> I'm saying we have history here, and that history, while poorly documented, > >> wasn't followed. To the extent it is poorly documented, we should fix that. > >> > >> Warner > >> > > I agree that we should document the process. Maybe also include > > freebsd-numerics@ on these discussions, as that is why it was created. > > > > But I'm really glad these changes were committed. I have found the > > people tend to drag their feet a lot on numerics issues. > > > > Has anyone done an analysis of the OpenBSD powl functions from an > > accuracy point of view? That is, to test how many ULP of error these > > functions have? If not, I could give it a go, although not for several > > months because life is very busy. > > They're also used by Julia. You might ask there first. The FPU on i686-class hardware is set to use 53-bit precision. powl.c likely has at least a 2**11 ULP for a (large?) number of arguments. Go read the msun/src/math_private.h. You'll find LD80C for constucting long double literal constants, ENTERI() and RETURNI() marcos that toggle the precision of the FPU. These are used in ld80 code, e.g., e_lgammal_r.c. So, it doesn't matter what the Julia developers say unless their testing was done on FreeBSD. -- Steve