Mail Archives: cygwin/2005/10/08/10:50:44
Joost Kraaijeveld wrote:
>
> The problem is that configure seems to think that there *is* support
> "long double math": the test succeeds and HAVE_ASINL (and all other
> double math) is defined. So both compile and link appear to be succesful
> as far as configure is concerned.
>
> Before choosing a solution, I want to understand why the problem is
> occuring.
>
> According to the cited mail however, that is because configure checks
> the availibility of "long double math" with a short piece of code,
> supplying *it's own* function definition (and not using e.g. math.h) and
> linking with *some* libraries. Because I do not understand how configure
> is doing that (I have looked into the macros but failed to understand
> them), I do not know what exactly the code is configure is using or to
> which libraries configure links the executable. I think btw that it is
> using libstdc++:
> $ objdump.exe -t libstdc++.a | grep asinl
> [ 2](sec 1)(fl 0x00)(ty 20)(scl 2) (nx 0) 0x00000020 _asinl
>
If the application has a configure which simply checks for some
instances of extra precision, without actually checking the presence of
each function in the headers and libraries to be used, that seems
broken. There are plenty of expert models for such configure scripts,
such as the one used in the libstdc++ build itself. Maybe we should
look into how libstdc++ decides it can support asinl() on Cygwin. Did
you check whether it is actually using long double, or some mixture of
double and long double? I'll try to remember to look next time I build
libstdc++.
In case the application is serious about wanting more accuracy than
asin(), I'll point out that the usual macro-like definitions using code
like atan2l(x,sqrtl(1-x*x) will lose up to 9 bits of precision, compared
with atan2l(x,sqrtl((1+x)*(1-x))). The former version is accurate (and
faster) only on architecture with infinite precision fused multiply-add.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -