On Dec 9, 2011, at 12:34 PM, Peter Karasev wrote:
I'm having issues compiling for some 'not ordinary' hardware, with
link errors like "undefined reference to __gcc_qtod()". I suspect it
arises from uses of "long double" such as in slsqp.c , which is
supposed to be quadruple precision according to
http://www.gnu.org/s/gsl/manual/html_node/Long-double.html
I guess, (1) how safe is it to just replace these with "double", and
(2) I'd be interested in any more elegant solutions, e.g. perhaps
there's some package to enable quadruple support ...
Actually, on most platforms (x86), "long double" is compiled to 80-bit
extended precision (which is supported in the hardware), not 128-bit
quad precision (which is invariably implemented in software).
However, on some other hardware (e.g. PowerPC and SPARC) it is true
that gcc may generate quadruple precision for long double. I'm
guessing that you just need to link to libgcc (which is included with
gcc) to get these __gcc_* internal functions.
In any case, it is almost certainly safe to just replace these with
"double" in slsqp.c.
_______________________________________________
NLopt-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss