From owner-freebsd-current@FreeBSD.ORG Sat Sep 15 01:06:07 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 719A31065673; Sat, 15 Sep 2012 01:06:07 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) by mx1.freebsd.org (Postfix) with ESMTP id 40E838FC16; Sat, 15 Sep 2012 01:06:07 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.5/8.14.5) with ESMTP id q8F160vS070443; Fri, 14 Sep 2012 18:06:00 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.5/8.14.5/Submit) id q8F160b5070442; Fri, 14 Sep 2012 18:06:00 -0700 (PDT) (envelope-from sgk) Date: Fri, 14 Sep 2012 18:06:00 -0700 From: Steve Kargl To: Brooks Davis Message-ID: <20120915010600.GA70426@troutmask.apl.washington.edu> References: <20120911132410.GA87126@troutmask.apl.washington.edu> <504F4645.4070900@FreeBSD.org> <504F4A6B.4010001@coosemans.org> <504F5101.8090906@FreeBSD.org> <505101C3.70203@freebsd.org> <20120913020833.GA8255@troutmask.apl.washington.edu> <1347550332.1110.108.camel@revolution.hippie.lan> <20120913161024.GA13846@troutmask.apl.washington.edu> <20120914202319.GB5244@lor.one-eyed-alien.net> <20120915001808.GA70215@troutmask.apl.washington.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120915001808.GA70215@troutmask.apl.washington.edu> User-Agent: Mutt/1.4.2.3i Cc: Ian Lepore , Tijl Coosemans , current@freebsd.org, Dimitry Andric , toolchain@freebsd.org, Nathan Whitehorn Subject: Re: Clang as default compiler November 4th X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 15 Sep 2012 01:06:08 -0000 On Fri, Sep 14, 2012 at 05:18:08PM -0700, Steve Kargl wrote: > > A third class of failure appears to be that clang emits > i387 fpu instructions for at least sinf and cosf instead > of calls to the library routines. AFAIK, the library > routines are faster and more accurate. > Yep. Clang has problems with at least sinf on i386 FreeBSD. % pwd /usr/home/kargl/trunk/math/sine % make clean && make CC=cc testf cc -o testf -O2 -pipe -static -I/usr/local/include -I../mp testf.c \ -L/usr/local/lib -L../mp -lsgk -lmpfr -lgmp -lm % ./testf -m 0 -M 1e20 -r ULP Range | -----------+------------------------- [0.0:0.6] | 1006424 (100.00%) (0.6:0.7] | 0 ( 0.00%) (0.7:0.8] | 0 ( 0.00%) (0.8:0.9] | 0 ( 0.00%) (0.9:1.0] | 0 ( 0.00%) (1.0:2.0] | 0 ( 0.00%) (2.0:3.0] | 0 ( 0.00%) 3.0 < ULP | 0 ( 0.00%) -----------+------------------------- Count | 1006424 Max ULP | 0.50084 Max ULP x | 53462490661259313152.000000 0x1.72f876p+65 % make clean && make CC=clang testf clang -o testf -O2 -pipe -static -I/usr/local/include -I../mp testf.c \ -L/usr/local/lib -L../mp -lsgk -lmpfr -lgmp -lm % ./testf -m 0 -M 1e20 -r ULP Range | -----------+------------------------- [0.0:0.6] | 1 ( 0.00%) (0.6:0.7] | 0 ( 0.00%) (0.7:0.8] | 0 ( 0.00%) (0.8:0.9] | 0 ( 0.00%) (0.9:1.0] | 0 ( 0.00%) (1.0:2.0] | 0 ( 0.00%) (2.0:3.0] | 0 ( 0.00%) 3.0 < ULP | 999998 (100.00%) -----------+------------------------- Count | 999999 Max ULP | 1328505256679420125050194353979392.00000 Max ULP x | 75516780764213542912.000000 0x1.06006p+66 -- Steve