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] Use libc_fe*() in 32-bit nearbyint()


On 01/15/2013 06:50 PM, David Miller wrote:
> 
> I noticed, while doing some sparc optimizations, that while the
> wordsize-64 variant of s_nearbyint.c used the proper 'libc_'
> prefixed fenv interfaces, the 32-bit wordsize one did not.
> 
> Any objections?

None at all. Please check this in.

> 2013-01-15  David S. Miller  <davem@davemloft.net>
> 
> 	* sysdeps/ieee754/dbl-64/s_nearbyint.c (__nearbyint): Use
> 	libc_feholdexcept and libc_fesetenv.

We probably just missed this file during the conversion.

I'm reminded of Zack Weinberg's paper "A Maintenance Programmer's
View of GCC"

To quote:
~~~
Even so, GCC's code could be much simpler
and easier to maintain. This can be put down to
three primary causes: incomplete transitions,
functional duplication, and inadequate modu-
larity.
~~~

Future programmers might stare for hours wondering what
reasons there might be for *not* using libc_* variants
of these function in just this one file.

Cheers,
Carlos.


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