From 1705f0a392f382bf3facda8d95cc7547ef708bf7 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 13 Jan 2004 09:08:04 +0000 Subject: * Versions.def (libm): Add GLIBC_2.3.3. * sysdeps/alpha/fpu/Versions: Add __c1_c*f and c*f to GLIBC_2.3.3. * sysdeps/alpha/fpu/cabsf.c, sysdeps/alpha/fpu/cargf.c, sysdeps/alpha/fpu/cfloat-compat.h, sysdeps/alpha/fpu/cimagf.c, sysdeps/alpha/fpu/conjf.c, sysdeps/alpha/fpu/crealf.c, sysdeps/alpha/fpu/s_cacosf.c, sysdeps/alpha/fpu/s_cacoshf.c, sysdeps/alpha/fpu/s_casinf.c, sysdeps/alpha/fpu/s_casinhf.c, sysdeps/alpha/fpu/s_catanf.c, sysdeps/alpha/fpu/s_catanhf.c, sysdeps/alpha/fpu/s_ccosf.c, sysdeps/alpha/fpu/s_ccoshf.c, sysdeps/alpha/fpu/s_cexpf.c, sysdeps/alpha/fpu/s_clog10f.c, sysdeps/alpha/fpu/s_clogf.c, sysdeps/alpha/fpu/s_cpowf.c, sysdeps/alpha/fpu/s_cprojf.c, sysdeps/alpha/fpu/s_csinf.c, sysdeps/alpha/fpu/s_csinhf.c, sysdeps/alpha/fpu/s_csqrtf.c, sysdeps/alpha/fpu/s_ctanf.c, sysdeps/alpha/fpu/s_ctanhf.c: New files. * sysdeps/alpha/fpu/bits/mathdef.h: Rename complex float functions for gcc 3.3. * sysdeps/generic/s_cacosf.c, sysdeps/generic/s_cacoshf.c, sysdeps/generic/s_casinf.c, sysdeps/generic/s_casinhf.c, sysdeps/generic/s_catanf.c, sysdeps/generic/s_catanhf.c, sysdeps/generic/s_ccosf.c, sysdeps/generic/s_ccoshf.c, sysdeps/generic/s_cexpf.c, sysdeps/generic/s_clog10f.c, sysdeps/generic/s_clogf.c, sysdeps/generic/s_cpowf.c, sysdeps/generic/s_cprojf.c, sysdeps/generic/s_csinf.c, sysdeps/generic/s_csinhf.c, sysdeps/generic/s_csqrtf.c, sysdeps/generic/s_ctanf.c, sysdeps/generic/s_ctanhf.c: Don't weak_alias if the function name has been #defined. * math/cabsf.c: Move ... * sysdeps/generic/cabsf.c: ... here. * math/cargf.c: Move ... * sysdeps/generic/cargf.c: ... here. * math/cimagf.c: Move ... * sysdeps/generic/cimagf.c: ... here. * math/conjf.c: Move ... * sysdeps/generic/conjf.c: ... here. * math/crealf.c: Move ... * sysdeps/generic/crealf.c: ... here. 2004-01-13 Richard Henderson * Versions.def (libm): Add GLIBC_2.3.3. * sysdeps/alpha/fpu/Versions: Add __c1_c*f and c*f to GLIBC_2.3.3. * sysdeps/alpha/fpu/cabsf.c, sysdeps/alpha/fpu/cargf.c, sysdeps/alpha/fpu/cfloat-compat.h, sysdeps/alpha/fpu/cimagf.c, sysdeps/alpha/fpu/conjf.c, sysdeps/alpha/fpu/crealf.c, sysdeps/alpha/fpu/s_cacosf.c, sysdeps/alpha/fpu/s_cacoshf.c, sysdeps/alpha/fpu/s_casinf.c, sysdeps/alpha/fpu/s_casinhf.c, sysdeps/alpha/fpu/s_catanf.c, sysdeps/alpha/fpu/s_catanhf.c, sysdeps/alpha/fpu/s_ccosf.c, sysdeps/alpha/fpu/s_ccoshf.c, sysdeps/alpha/fpu/s_cexpf.c, sysdeps/alpha/fpu/s_clog10f.c, sysdeps/alpha/fpu/s_clogf.c, sysdeps/alpha/fpu/s_cpowf.c, sysdeps/alpha/fpu/s_cprojf.c, sysdeps/alpha/fpu/s_csinf.c, sysdeps/alpha/fpu/s_csinhf.c, sysdeps/alpha/fpu/s_csqrtf.c, sysdeps/alpha/fpu/s_ctanf.c, sysdeps/alpha/fpu/s_ctanhf.c: New files. * sysdeps/alpha/fpu/bits/mathdef.h: Rename complex float functions for gcc 3.3. * sysdeps/generic/s_cacosf.c, sysdeps/generic/s_cacoshf.c, sysdeps/generic/s_casinf.c, sysdeps/generic/s_casinhf.c, sysdeps/generic/s_catanf.c, sysdeps/generic/s_catanhf.c, sysdeps/generic/s_ccosf.c, sysdeps/generic/s_ccoshf.c, sysdeps/generic/s_cexpf.c, sysdeps/generic/s_clog10f.c, sysdeps/generic/s_clogf.c, sysdeps/generic/s_cpowf.c, sysdeps/generic/s_cprojf.c, sysdeps/generic/s_csinf.c, sysdeps/generic/s_csinhf.c, sysdeps/generic/s_csqrtf.c, sysdeps/generic/s_ctanf.c, sysdeps/generic/s_ctanhf.c: Don't weak_alias if the function name has been #defined. * math/cabsf.c: Move ... * sysdeps/generic/cabsf.c: ... here. * math/cargf.c: Move ... * sysdeps/generic/cargf.c: ... here. * math/cimagf.c: Move ... * sysdeps/generic/cimagf.c: ... here. * math/conjf.c: Move ... * sysdeps/generic/conjf.c: ... here. * math/crealf.c: Move ... * sysdeps/generic/crealf.c: ... here. --- sysdeps/generic/cabsf.c | 29 +++++++++++++++++++++++++++++ sysdeps/generic/cargf.c | 29 +++++++++++++++++++++++++++++ sysdeps/generic/cimagf.c | 28 ++++++++++++++++++++++++++++ sysdeps/generic/conjf.c | 28 ++++++++++++++++++++++++++++ sysdeps/generic/crealf.c | 28 ++++++++++++++++++++++++++++ sysdeps/generic/s_cacosf.c | 2 ++ sysdeps/generic/s_cacoshf.c | 2 ++ sysdeps/generic/s_casinf.c | 2 ++ sysdeps/generic/s_casinhf.c | 2 ++ sysdeps/generic/s_catanf.c | 2 ++ sysdeps/generic/s_catanhf.c | 2 ++ sysdeps/generic/s_ccosf.c | 2 ++ sysdeps/generic/s_ccoshf.c | 2 ++ sysdeps/generic/s_cexpf.c | 2 ++ sysdeps/generic/s_clog10f.c | 2 ++ sysdeps/generic/s_clogf.c | 2 ++ sysdeps/generic/s_cpowf.c | 2 ++ sysdeps/generic/s_cprojf.c | 2 ++ sysdeps/generic/s_csinf.c | 2 ++ sysdeps/generic/s_csinhf.c | 2 ++ sysdeps/generic/s_csqrtf.c | 2 ++ sysdeps/generic/s_ctanf.c | 2 ++ sysdeps/generic/s_ctanhf.c | 2 ++ 23 files changed, 178 insertions(+) create mode 100644 sysdeps/generic/cabsf.c create mode 100644 sysdeps/generic/cargf.c create mode 100644 sysdeps/generic/cimagf.c create mode 100644 sysdeps/generic/conjf.c create mode 100644 sysdeps/generic/crealf.c (limited to 'sysdeps/generic') diff --git a/sysdeps/generic/cabsf.c b/sysdeps/generic/cabsf.c new file mode 100644 index 0000000000..956db76ba1 --- /dev/null +++ b/sysdeps/generic/cabsf.c @@ -0,0 +1,29 @@ +/* Return the complex absolute value of float complex value. + Copyright (C) 1997, 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1997. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include + +float +__cabsf (float _Complex z) +{ + return __hypotf (__real__ z, __imag__ z); +} +weak_alias (__cabsf, cabsf) diff --git a/sysdeps/generic/cargf.c b/sysdeps/generic/cargf.c new file mode 100644 index 0000000000..df1f20bc48 --- /dev/null +++ b/sysdeps/generic/cargf.c @@ -0,0 +1,29 @@ +/* Compute argument of complex float value. + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1997. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include + +float +__cargf (__complex__ float x) +{ + return __atan2f (__imag__ x, __real__ x); +} +weak_alias (__cargf, cargf) diff --git a/sysdeps/generic/cimagf.c b/sysdeps/generic/cimagf.c new file mode 100644 index 0000000000..d4e441e69f --- /dev/null +++ b/sysdeps/generic/cimagf.c @@ -0,0 +1,28 @@ +/* Return imaginary part of complex float value. + Copyright (C) 1997, 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1997. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include + +float +__cimagf (float _Complex z) +{ + return __imag__ z; +} +weak_alias (__cimagf, cimagf) diff --git a/sysdeps/generic/conjf.c b/sysdeps/generic/conjf.c new file mode 100644 index 0000000000..7893891933 --- /dev/null +++ b/sysdeps/generic/conjf.c @@ -0,0 +1,28 @@ +/* Return complex conjugate of complex float value. + Copyright (C) 1997, 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1997. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include + +float _Complex +__conjf (float _Complex z) +{ + return ~z; +} +weak_alias (__conjf, conjf) diff --git a/sysdeps/generic/crealf.c b/sysdeps/generic/crealf.c new file mode 100644 index 0000000000..e3235a874f --- /dev/null +++ b/sysdeps/generic/crealf.c @@ -0,0 +1,28 @@ +/* Return real part of complex float value. + Copyright (C) 1997, 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1997. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include + +float +__crealf (float _Complex z) +{ + return __real__ z; +} +weak_alias (__crealf, crealf) diff --git a/sysdeps/generic/s_cacosf.c b/sysdeps/generic/s_cacosf.c index 24070dc5fb..265184e38d 100644 --- a/sysdeps/generic/s_cacosf.c +++ b/sysdeps/generic/s_cacosf.c @@ -34,4 +34,6 @@ __cacosf (__complex__ float x) return res; } +#ifndef __cacosf weak_alias (__cacosf, cacosf) +#endif diff --git a/sysdeps/generic/s_cacoshf.c b/sysdeps/generic/s_cacoshf.c index 4a11285d0f..52c35505e0 100644 --- a/sysdeps/generic/s_cacoshf.c +++ b/sysdeps/generic/s_cacoshf.c @@ -96,4 +96,6 @@ __cacoshf (__complex__ float x) return res; } +#ifndef __cacoshf weak_alias (__cacoshf, cacoshf) +#endif diff --git a/sysdeps/generic/s_casinf.c b/sysdeps/generic/s_casinf.c index 83f147ba9f..5278dbbf78 100644 --- a/sysdeps/generic/s_casinf.c +++ b/sysdeps/generic/s_casinf.c @@ -59,4 +59,6 @@ __casinf (__complex__ float x) return res; } +#ifndef __casinf weak_alias (__casinf, casinf) +#endif diff --git a/sysdeps/generic/s_casinhf.c b/sysdeps/generic/s_casinhf.c index d678786731..7037ab937c 100644 --- a/sysdeps/generic/s_casinhf.c +++ b/sysdeps/generic/s_casinhf.c @@ -77,4 +77,6 @@ __casinhf (__complex__ float x) return res; } +#ifndef __casinhf weak_alias (__casinhf, casinhf) +#endif diff --git a/sysdeps/generic/s_catanf.c b/sysdeps/generic/s_catanf.c index cc9e5ea7a8..25eec2b1b5 100644 --- a/sysdeps/generic/s_catanf.c +++ b/sysdeps/generic/s_catanf.c @@ -82,4 +82,6 @@ __catanf (__complex__ float x) return res; } +#ifndef __catanf weak_alias (__catanf, catanf) +#endif diff --git a/sysdeps/generic/s_catanhf.c b/sysdeps/generic/s_catanhf.c index 30a5a1b8ac..d2422e6111 100644 --- a/sysdeps/generic/s_catanhf.c +++ b/sysdeps/generic/s_catanhf.c @@ -77,4 +77,6 @@ __catanhf (__complex__ float x) return res; } +#ifndef __catanhf weak_alias (__catanhf, catanhf) +#endif diff --git a/sysdeps/generic/s_ccosf.c b/sysdeps/generic/s_ccosf.c index efdcdcc221..4b154deac5 100644 --- a/sysdeps/generic/s_ccosf.c +++ b/sysdeps/generic/s_ccosf.c @@ -73,4 +73,6 @@ __ccosf (__complex__ float x) return res; } +#ifndef __ccosf weak_alias (__ccosf, ccosf) +#endif diff --git a/sysdeps/generic/s_ccoshf.c b/sysdeps/generic/s_ccoshf.c index 339b6bc1c8..f400d34f0b 100644 --- a/sysdeps/generic/s_ccoshf.c +++ b/sysdeps/generic/s_ccoshf.c @@ -98,4 +98,6 @@ __ccoshf (__complex__ float x) return retval; } +#ifndef __ccoshf weak_alias (__ccoshf, ccoshf) +#endif diff --git a/sysdeps/generic/s_cexpf.c b/sysdeps/generic/s_cexpf.c index 93bfe2049e..7b68fc365c 100644 --- a/sysdeps/generic/s_cexpf.c +++ b/sysdeps/generic/s_cexpf.c @@ -120,4 +120,6 @@ __cexpf (__complex__ float x) return retval; } +#ifndef __cexpf weak_alias (__cexpf, cexpf) +#endif diff --git a/sysdeps/generic/s_clog10f.c b/sysdeps/generic/s_clog10f.c index 6d60c5fc23..eed81f368c 100644 --- a/sysdeps/generic/s_clog10f.c +++ b/sysdeps/generic/s_clog10f.c @@ -58,4 +58,6 @@ __clog10f (__complex__ float x) return result; } +#ifndef __clog10f weak_alias (__clog10f, clog10f) +#endif diff --git a/sysdeps/generic/s_clogf.c b/sysdeps/generic/s_clogf.c index c7151f2e5f..21e3b57b7f 100644 --- a/sysdeps/generic/s_clogf.c +++ b/sysdeps/generic/s_clogf.c @@ -58,4 +58,6 @@ __clogf (__complex__ float x) return result; } +#ifndef __clogf weak_alias (__clogf, clogf) +#endif diff --git a/sysdeps/generic/s_cpowf.c b/sysdeps/generic/s_cpowf.c index 16a6302581..58eaa1aa06 100644 --- a/sysdeps/generic/s_cpowf.c +++ b/sysdeps/generic/s_cpowf.c @@ -27,4 +27,6 @@ __cpowf (__complex__ float x, __complex__ float c) { return __cexpf (c * __clogf (x)); } +#ifndef __cpowf weak_alias (__cpowf, cpowf) +#endif diff --git a/sysdeps/generic/s_cprojf.c b/sysdeps/generic/s_cprojf.c index 83809eea0e..83df13cfa9 100644 --- a/sysdeps/generic/s_cprojf.c +++ b/sysdeps/generic/s_cprojf.c @@ -44,4 +44,6 @@ __cprojf (__complex__ float x) return res; } +#ifndef __cprojf weak_alias (__cprojf, cprojf) +#endif diff --git a/sysdeps/generic/s_csinf.c b/sysdeps/generic/s_csinf.c index b7278810de..8004743bd3 100644 --- a/sysdeps/generic/s_csinf.c +++ b/sysdeps/generic/s_csinf.c @@ -124,4 +124,6 @@ __csinf (__complex__ float x) return retval; } +#ifndef __csinf weak_alias (__csinf, csinf) +#endif diff --git a/sysdeps/generic/s_csinhf.c b/sysdeps/generic/s_csinhf.c index 5cf80d0f97..e4bb704268 100644 --- a/sysdeps/generic/s_csinhf.c +++ b/sysdeps/generic/s_csinhf.c @@ -119,4 +119,6 @@ __csinhf (__complex__ float x) return retval; } +#ifndef __csinhf weak_alias (__csinhf, csinhf) +#endif diff --git a/sysdeps/generic/s_csqrtf.c b/sysdeps/generic/s_csqrtf.c index f7b18368b5..b02c605a37 100644 --- a/sysdeps/generic/s_csqrtf.c +++ b/sysdeps/generic/s_csqrtf.c @@ -107,4 +107,6 @@ __csqrtf (__complex__ float x) return res; } +#ifndef __csqrtf weak_alias (__csqrtf, csqrtf) +#endif diff --git a/sysdeps/generic/s_ctanf.c b/sysdeps/generic/s_ctanf.c index 89bc84741c..e02971dd44 100644 --- a/sysdeps/generic/s_ctanf.c +++ b/sysdeps/generic/s_ctanf.c @@ -67,4 +67,6 @@ __ctanf (__complex__ float x) return res; } +#ifndef __ctanf weak_alias (__ctanf, ctanf) +#endif diff --git a/sysdeps/generic/s_ctanhf.c b/sysdeps/generic/s_ctanhf.c index b9e3c57fc4..cfcabab36a 100644 --- a/sysdeps/generic/s_ctanhf.c +++ b/sysdeps/generic/s_ctanhf.c @@ -67,4 +67,6 @@ __ctanhf (__complex__ float x) return res; } +#ifndef __ctanhf weak_alias (__ctanhf, ctanhf) +#endif -- cgit 1.4.1