This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


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

Re: Two small patches


Alfred Minarik <a8601248@unet.univie.ac.at> writes:

| Gabriel Dos_Reis wrote:
| > 
| > In fact, the 'correct' fix is
| > 
| >         inline float
| >         modf(float __x, float* __y) { return ::modff(__x, __y); }
| > 
| > that is I should have written ::modff(); not ::modf().
| 
| This is interesting, as I was under 
| the impression, that the intend of this header
| is to implement float function with their
| double equivalents.

In fact I did so because the float versions weren't available.  A week
ago (see Changelog), I started using GCC builtin functions --
i.e. __builtin_sinf etc. -- but for obscure reasons I don't yet fully
understand they seem to break builds on Solaris and hpux, see Changelog
entry on 1999-06-02 from Benjamin.

| So as it is possible to use the '___f' versions,
| what is the point in going through doubles at
| all.

The point is that those '___f' versions you're talking about aren't
available on all systems, for example they are inexistent on
solaris-2.[56]. 

| 
| so for example with sin() instead of 
| 
| inline float
| sin(float __x) { return ::sin(__x); }
| 
| why not 
| 
| inline float
| sin(float __x) { return ::sinf(__x); }

See above.  I'd much prefer

	inline float
	sin(float __x) { return __builtin_sinf(__x); }

Regards,

-- Gaby

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