This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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: Why are mpfr, mpc and gmp needed for gcc?


On 04/02/2012 09:11 AM, René Nyffenegger wrote:
I hope this is the right place to ask this question. I only
recently tried to compile gcc and it is obviously dependant
on mpfr, mpc and gmp. These seem to be high precision
mathematical libraries. Now, I am wondering why a compiler
not only needs one of these but even three of them.


While optimizing code, GCC can simplify some floating point expressions. It uses these libraries to carry out the arithmetic associated with these optimizations.


For example, things like:

x = 2.3 + 1.3;

Could be simplified to:

x = 3.6;


David Daney



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