From owner-freebsd-numerics@FreeBSD.ORG Fri Sep 6 19:02:19 2013 Return-Path: Delivered-To: freebsd-numerics@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B3BC5C7F; Fri, 6 Sep 2013 19:02:19 +0000 (UTC) (envelope-from m.e.sanliturk@gmail.com) Received: from mail-ve0-x232.google.com (mail-ve0-x232.google.com [IPv6:2607:f8b0:400c:c01::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 395722729; Fri, 6 Sep 2013 19:02:19 +0000 (UTC) Received: by mail-ve0-f178.google.com with SMTP id jw12so1988428veb.9 for ; Fri, 06 Sep 2013 12:02:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=QZkTcr1nmxdo+EJDSH5W7hlYTV1Uqc4viN32Kte1nP4=; b=ez66mmLj4U9PsSFfYAulAb8mlH5t88haQVspLMFVjkMbNFVgEXBUUihcV2mgbOy3Ab 5KoRFaiKwTjkr6QZ1fEXx/i6tNxo3bFjoP+91m2KNskOumSnD7p/l/FP1W4jqha8HwAd IgvYTY+KMYLBL7I8yZCyxk8B3S5GNY9RKJnQBWgksR8Ij/hvhGEwTEkpeo9Ly7KomMfJ kb5TeooBAKMjbatovifBr87kGt5YvlyVf/A6/CGl1Vu0ju/54F86+o+TO5yoYPUbASju r42Ru1LeCu15pbiZTBf4LqUXj/uNnde358s/tcl0epM+eY+Vm7F6I5gLAicAqHVm+EqT i9OQ== MIME-Version: 1.0 X-Received: by 10.58.207.103 with SMTP id lv7mr1232666vec.33.1378494138355; Fri, 06 Sep 2013 12:02:18 -0700 (PDT) Received: by 10.58.118.104 with HTTP; Fri, 6 Sep 2013 12:02:18 -0700 (PDT) In-Reply-To: <20130906155939.GA63661@troutmask.apl.washington.edu> References: <20130904223842.GB82066@ithaqua.etoilebsd.net> <80062343-53CD-4CEF-9C47-3BF614DADB64@FreeBSD.org> <20130905210953.GA58413@troutmask.apl.washington.edu> <4DF3383B-4BE7-4947-886A-AAAD25172F68@freebsd.org> <20130906155939.GA63661@troutmask.apl.washington.edu> Date: Fri, 6 Sep 2013 15:02:18 -0400 Message-ID: Subject: Re: clang+libc++ using missing powl From: Mehmet Erol Sanliturk To: Steve Kargl Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: Baptiste Daroussin , "freebsd-numerics@FreeBSD.org" , David Chisnall , "current@freebsd.org Current" 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: Fri, 06 Sep 2013 19:02:19 -0000 On Fri, Sep 6, 2013 at 11:59 AM, Steve Kargl < sgk@troutmask.apl.washington.edu> wrote: > On Fri, Sep 06, 2013 at 07:54:46AM +0100, David Chisnall wrote: > > > > On 5 Sep 2013, at 22:09, Steve Kargl > wrote: > > > > > On Thu, Sep 05, 2013 at 09:52:13AM +0100, David Chisnall wrote: > > >> On 4 Sep 2013, at 23:38, Baptiste Daroussin wrote: > > >> > > >>> As a result we have a lot of fallouts of ports complaining about: > > >>> undefined reference to `powl' > > >>> > > >>> It seems like libc++ is relying on a function we don't have yet > > >>> in libm, am I missing something? > > >> > > >> I've attached a diff that I'd like to commit to msun > > > > > > Why not disable libc++ from exposing these functions? > > > > Because they're in the C++ spec and they should work. > > I consider this a placeholder until we have the real versions > > in the tree (the wiki says you have coshl, sinhl, and tanhl, > > in progress, any idea of an ETA for them)? > > Well, your commit has pre-empted any discussion on whether > there would have been a better kludge. Oh well. > > Concerning coshl, sinhl, and tanhl. I had integrated bde's > code into msun and prepared a patch to commit over a week ago. > Unfortunately, my testing on sparc64 revealed a few issues > with tanhl, and Bruce and I are still discussing the fix. > > PS: I have working erfl and erfcl for ld80 archs. I'm still > testing and refining the code. It turns out that computing > the needed rational approximation is fairly difficult (at least > for me). > > -- > Steve > Not only for you , because function values are not very "smooth" , and representation by an approximation is very difficult . During many weeks , I am trying to obtain good approximations to cumulative normal distribution and its inverse , without very much success . Approximation to inverse cumulative normal distribution is much more difficult than cumulative normal distribution . I am using Fortran double precision . I think , it is necessary to use an arbitrary precision package for optimization , but I do not have any one . Thank you very much . Mehmet Erol Sanliturk