This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 07/28] powerpc: trunc/truncf refactor
- From: "Gabriel F. T. Gomes" <gabriel at inconstante dot eti dot br>
- To: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Cc: <libc-alpha at sourceware dot org>
- Date: Thu, 9 May 2019 18:36:22 -0300
- Subject: Re: [PATCH 07/28] powerpc: trunc/truncf refactor
- References: <20190329133529.22523-1-adhemerval.zanella@linaro.org> <20190329133529.22523-8-adhemerval.zanella@linaro.org> <20190509200618.mq2mtgtdmdryumu4@tereshkova> <abecf129-0ed7-c52a-f1f6-7a28bc8bc908@linaro.org>
On Thu, May 09 2019, Adhemerval Zanella wrote:
>
> On 09/05/2019 17:06, Gabriel F. T. Gomes wrote:
> >
> > This comment got lost. Would you deem it appropriate to reinstate it
> > somewhere in round_to_integer_double (you would need to make it generic
> > so that it fits the four rounding directions (so far), as well as
> > nearbyint from the subsequent patch... perhaps something along the lines
> > of the paragraph below)?
> >
> > IEEE 1003.1 nearest integer functions. IEEE specifies several
> > functions that approximate a floating-point to a nearby integer value.
> > For each of them we set the appropriate rounding mode, then add and
> > subtract +-2**52.
> >
>
> My view is such direct comments is useful on assembly implementation
> where is not really obvious what the instruction sequence is doing.
> I usually see that the C counterpart should be straightforward to infer
> this. I can reinstate the comment though if you think it is really
> valuable.
I guess you are right. The patch is good without the comment.
Thanks.