Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 May 2000 02:39:59 -0700 (PDT)
From:      neis@cdc.informatik.tu-darmstadt.de
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   i386/18560: libm's log1p not working as designed on Intel architectures.
Message-ID:  <20000515093959.8AE2137B52F@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000515093959.8AE2137B52F>