From owner-freebsd-bugs Mon May 15 2:40: 6 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id C0D1E37B561 for ; Mon, 15 May 2000 02:40:04 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id CAA75783; Mon, 15 May 2000 02:40:04 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: by hub.freebsd.org (Postfix, from userid 32767) id 8AE2137B52F; Mon, 15 May 2000 02:39:59 -0700 (PDT) Message-Id: <20000515093959.8AE2137B52F@hub.freebsd.org> Date: Mon, 15 May 2000 02:39:59 -0700 (PDT) From: neis@cdc.informatik.tu-darmstadt.de To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: i386/18560: libm's log1p not working as designed on Intel architectures. Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 18560 >Category: i386 >Synopsis: libm's log1p not working as designed on Intel architectures. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon May 15 02:40:03 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Stefan Neis >Release: Actually none. >Organization: >Environment: >Description: While "porting" current libm to OS/2 (i.e. recompiling and running various tests), I noticed that assembler code for log1p(x) is basically as follows: Compute x+1, than call fyl2x. This plainly contradicts the man page: > log1p(x) returns a value equivalent to `log (1 + x)'. It > is computed in a way that is accurate even if the value of > x is near zero. IMHO, you really need to use fyl2xp1, if x is sufficiently close to 0 for that instruction to work (unfortunately is working only in a rather small interval). On a related issue, the various wrapper functions around assembler code cause an additional function call which really causes a performance loss. I have been able to speed up e.g. "acos" by more than then percent by replacing the assembler routine __ieee754_acos with inline assembler code. >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message