FAQ Question 4 vs. Question 10: --enable-hw-fp

Schwarz, Konrad konrad.schwarz@siemens.com
Wed Mar 23 08:59:00 GMT 2016

FAQ (https://sourceware.org/newlib/faq.html) Question 4 states

Of interest are the [...] and --enable-newlib-hw-fp options.
The newlib-hw-fp option causes the library to use a set of math routines
that use floating-point algorithms. By default, the newlib library math
routines use integer-based algorithms to perform the desired functionality.
For a platform that has fast floating-point support, the floating-point
algorithms may be faster and smaller.

FAQ Question 10 states

What is the libm/mathfp directory?
The libm/mathfp directory was a failed experiment to implement the libm
library using floating-point algorithms. The idea was to make this optional
for platforms that had floating-point instructions. Some of the algorithms
use recursion and are simply inaccurate, especially when presented the
full range of possible input arguments such as very large and very
small values. The library used to be enabled via the
--enable-newlib-hw-fp option, but has been disabled in
configure.in as of Oct 24/2012.

Do these answers contradict each other?
Should --enable-hw-fp be used or not?

Konrad Schwarz

More information about the Newlib mailing list