Re: Why are mpfr, mpc and gmp needed for gcc?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jonathan Wakely wrote:


It needs three of them because they do different things.

GCC requires MPFR in order to do floating point calculations are
compile-time, so that e.g. pow(0.5, 4) can be replaced with a constant
value instead of calling a function at run-time.  GCC uses MFPR to get
accurate, platform-independent results that don't depend on the host
math library, which might be inaccurate or buggy.  MPC is used to do
similar optimisations for complex numbers.  MPFR requires GMP.

Just curious...

Is there a big difference when using these libraries from system available math library ? Is this difference more noticeable in some platforms than in other ones ?

I guess (and I hope) that not all math libraries are inaccurate or buggy, as if this is the case and if the compiled program does math calculations using these inaccurate libraries... no need to optimize a code which will give inaccurate results.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux