This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Use libc_fe*() in 32-bit nearbyint()
- From: Carlos O'Donell <carlos at systemhalted dot org>
- To: David Miller <davem at davemloft dot net>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 15 Jan 2013 22:59:17 -0500
- Subject: Re: [PATCH] Use libc_fe*() in 32-bit nearbyint()
- References: <20130115.185057.1438838914023821689.davem@davemloft.net>
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.