Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Jun 2004 01:40:12 GMT
From:      "Steven G. Kargl" <kargl@troutmask.apl.washington.edu>
To:        freebsd-standards@FreeBSD.org
Subject:   Re: standards/59797: Implement C99's round[f]() math fucntions
Message-ID:  <200406070140.i571eC4P006306@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR standards/59797; it has been noted by GNATS.

From: "Steven G. Kargl" <kargl@troutmask.apl.washington.edu>
To: David Schultz <das@FreeBSD.ORG>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG, freebsd-standards@FreeBSD.ORG
Subject: Re: standards/59797: Implement C99's round[f]() math fucntions
Date: Sun, 6 Jun 2004 18:33:53 -0700 (PDT)

 David Schultz wrote:
 > 
 > BTW, benchmarking shows that using the sample implementation that
 > appears in the C99 standard results in a slowdown of two orders of
 > magnitude over your round() implementation and four orders of
 > magnitude over the x87 frndint instruction.  Just setting the
 > rounding mode and calling rint() also results in a significant
 > slowdown.  Thus, we definitely want something that's in the spirit
 > of what you wrote, but perhaps one that operates on the bits directly.
 > 
 
 I looked at the glibc implementation of round().  It does
 bit twiddling, but I would definitely recommend not using
 the glibc version because of licensing and possible copyright
 infringement concerns [hiint compare glibc's round() with
 fdlibm's ceil()].  
 
 -- 
 Steve
 http://troutmask.apl.washington.edu/~kargl/



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