Date: Sun, 30 Nov 2003 15:30:23 -0800 (PST) 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: <200311302330.hAUNUNkD090320@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: Stefan Farfeleder <stefan@fafoe.narf.at> 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/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200311302330.hAUNUNkD090320>