This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 07/28] powerpc: trunc/truncf refactor


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]