This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v4] Add nextup and nextdown math functions
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Rical Jasan <ricaljasan at pacific dot net>
- Cc: Rajalakshmi Srinivasaraghavan <raji at linux dot vnet dot ibm dot com>, <libc-alpha at sourceware dot org>
- Date: Mon, 13 Jun 2016 09:32:54 +0000
- Subject: Re: [PATCH v4] Add nextup and nextdown math functions
- Authentication-results: sourceware.org; auth=none
- References: <57599ABC dot 9070609 at linux dot vnet dot ibm dot com> <575A3EAF dot 4040209 at pacific dot net> <575D8A3C dot 6020908 at linux dot vnet dot ibm dot com> <575DE817 dot 8090101 at pacific dot net>
On Sun, 12 Jun 2016, Rical Jasan wrote:
> > +/* nextdown(x) returns the least floating-point number in the
> > + format of x less than x. */
>
> I was originally trying to discern whether subnormal arguments were
> always normalized, so this comment gave me pause. By "format" do you
> mean "type"?
>
> This comment is present in a handful of the files, but not all. If the
> comment is important, it should probably be present in all of them.
> Also, should it be moved right above the function? The placement and
> presence are inconsistent throughout.
The correct format, right above the function, does not name the function
and uses uppercase to refer to values of arguments.
Also, this comment is incorrect. It returns the *greatest* number less
than x. So
/* Return the greatest floating-point number less than X. */
suffices (the reader can see what the return type of the function is).
> I see a tab made the alignment off in my reply, but I can't find
> anything about whether glibc is spaces-only or not. Thought I'd point
> out the whitespace issue, though.
glibc uses tabs for indentation as much as possible.
--
Joseph S. Myers
joseph@codesourcery.com