From owner-freebsd-numerics@FreeBSD.ORG Thu Oct 31 13:33:53 2013 Return-Path: Delivered-To: freebsd-numerics@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 32687A7F; Thu, 31 Oct 2013 13:33:53 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EAF192D5D; Thu, 31 Oct 2013 13:33:52 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.7/8.14.7) with ESMTP id r9VDXqQD060101; Thu, 31 Oct 2013 06:33:52 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.7/8.14.7/Submit) id r9VDXq5L060100; Thu, 31 Oct 2013 06:33:52 -0700 (PDT) (envelope-from sgk) Date: Thu, 31 Oct 2013 06:33:52 -0700 From: Steve Kargl To: David Chisnall Subject: Re: MUSL math functions Message-ID: <20131031133352.GA59918@troutmask.apl.washington.edu> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "freebsd-numerics@FreeBSD.org" X-BeenThere: freebsd-numerics@freebsd.org X-Mailman-Version: 2.1.14 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: Thu, 31 Oct 2013 13:33:53 -0000 On Thu, Oct 31, 2013 at 10:46:15AM +0000, David Chisnall wrote: > Hi all, > > MUSL (permissively licensed libc for embedded Linux) appears to include implementations of all of the functions that we're currently missing for C99 compliance. According to the wiki, we are currently missing: > > > clogf, clog, clogl > coshl, sinhl, tanhl I have code for coshl, sinhl, and tanhl. > cexpl > sincosf, sincos, sincosl I have code for sincosf, sincos, and sincosl. > ccosl, ccoshl, csinl, csinhl, ctanl, ctanhl > cacosl, cacoshl, casinl, casinhl, catanl, catanhl > erfcl, erfl I have code for erfcl and erfl. > powl > lgammal, tgammal > cpowf, cpow, cpowl > > The following are marked as either in-progress or patches available: > > clogf, clog, clogl (bde) > sincosf, sincos, sincosl (kargl) > cacosl, cacoshl, casinl, casinhl, catanl, catanhl (stephen) > > Are these ready to commit? coshl, sinhl, tanhl are almost ready. This requires splitting a computational kernel out of expl. sincosf, sincos, and sincosl need to be retested and reviewed again. erfcl and erfl need to be resubmitted for additional review. > What are the current blockers for getting them in? 1) Code freeze for FreeBSD-10 came at the wrong time. 2) Got sidetracked on fixing a bug in roundl. 3) Can't update my development systems to FreeBSD-11 (where new code should appear) because news/pan does not compile with clang++ because clang++ appears to have problems compiling headers associated with libc++. 4) ENOTIME. > > These are present in the MUSL tree. > Have you looked at the code? Hint, I have. Here's ccoshl(). #include "libm.h" //FIXME long double complex ccoshl(long double complex z) { return ccosh(z); } > Many are from OpenBSD, some are home-grown: > > coshl, sinhl, tanhl > ccosl, ccoshl, csinl, csinhl, ctanl, ctanhl > erfcl, erfl > powl > lgammal, tgammal > cpowf, cpow, cpowl > > cexpl is missing > > Would anyone like to object to importing the ones that are implemented? > Yes. I object to importing anything from MUSL or OpenBSD or NetBSD without review or testing. It also appears that these functions are only available for ld80 archs. FreeBSD has both ld80 and ld128. -- Steve