From owner-freebsd-standards@FreeBSD.ORG Sun Nov 30 15:30:24 2003 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5090516A4CF for ; Sun, 30 Nov 2003 15:30:24 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 93B1643F75 for ; Sun, 30 Nov 2003 15:30:23 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id hAUNUNFY090321 for ; Sun, 30 Nov 2003 15:30:23 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id hAUNUNkD090320; Sun, 30 Nov 2003 15:30:23 -0800 (PST) (envelope-from gnats) Date: Sun, 30 Nov 2003 15:30:23 -0800 (PST) Message-Id: <200311302330.hAUNUNkD090320@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org From: "Steven G. Kargl" Subject: Re: standards/59797: Implement C99's round[f]() math fucntions X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: "Steven G. Kargl" List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Nov 2003 23:30:24 -0000 The following reply was made to PR standards/59797; it has been noted by GNATS. From: "Steven G. Kargl" To: Stefan Farfeleder Cc: bug-followup@FreeBSD.org Subject: Re: standards/59797: Implement C99's round[f]() math fucntions Date: Sun, 30 Nov 2003 15:21:22 -0800 (PST) Stefan Farfeleder wrote: > On Sat, Nov 29, 2003 at 10:06:27AM -0800, Steven G. Kargl wrote: > > +double round(double x) { > > + double t; > > + if (x >= 0.0) { > > + t = ceil(x); > > + if (t - x > 0.5) t -= 1.0; > > + return t; > > + } else { > > + t = ceil(-x); > > + if (t + x > 0.5) t -= 1.0; > > + return -t; > > + } > > +} > > One suggestion: Could you make that > > +double > +round(double x) > +{ > > to match style(9) and (most of) msun/src/*.c? > I'll submit a style(9) clean-up if the current diff is committed. If you look through msun, you'll see all sorts of sytle(9) violations. -- Steve http://troutmask.apl.washington.edu/~kargl/