Jonathan wrote:
For some reason the long double math functions (sqrtl, etc) can't be found. From what I can see, the linker shouldn't even be looking for them. Any thoughts?
Is there a long double type in the compiler? Is it 80 bits? If so it would probably be possible to use inline assembler, because there probably are coprocessor functions. The arbitrary precision code needs long double for handling the exponents, but there's a define to turn it off if long double is not available, as it usually isn't for gcc. It does no good to have long double if all the extra bits go to the mantissa and not the exponent. There's probably just a wrong define setting that makes the arbitray precision code need long double. FWIW (probably not much) Google turned up: extern long double __QNANL; long double sqrtl (long double x) { if (x < 0.0L ) { errno = EDOM; return __QNANL; } else { long double res; asm ("fsqrt" : "=t" (res) : "0" (x)); return res; } } But of course this would be useless without an 80 bit long double type like Microsoft C has. Tim