This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ieee754 implementation of tan/atan


In the implementation of the math library (./sysdeps/iee754) it is the norm
to
implement the function with the "__" prefix (__sin, __tan, ...) then
provide a
weak alias for the primary function name (i.e. sin, tan, ...). This allows
users
(either end uses or other compilers) to either use the default ieee754
implementation or override the function name with their own implementation.

This is true in glibc (2.2.4) except for the implementation of tan/atan for
double (./sysdeps/dbl-64/[s_tan.c |s_atan.c). All other double "trig"
functions (sin, cos, ...) export "__" prefixed symbols (__sin, __cos, ...)
then
export a weak alias for the unprefixed symbol (sin, cos, ...). Also all
float
"trig" functions (./sysdeps/flt-32/) implementations (including tanf and
atanf)
follow the form that implements the "__" prefixed form with a weak alias
for
the unprefixed form. This also seems to hold for the long double (ldbl-96
and ldbl-128) implementations.

So at minimum the double tan/atan implementations are inconsistent with the
rest of the ieee754 implementation Also some architectures (68K and
i386) override the tan/atan implementations and do export both symbols
(tan/__tan, atan/__atan). Implementation like powerpc (32- and 64-bit),
which do not override the ieee754 implementation, are missing the
__tan/__atan symbols.  ...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]