xref: /haiku/src/system/libroot/posix/glibc/math/creal.c (revision a83446983dea89a78ca52fa34243ac80772c03a0)
1*a8344698SJérôme Duval /* Return real part of complex double value.
2*a8344698SJérôme Duval    Copyright (C) 1997-2015 Free Software Foundation, Inc.
3*a8344698SJérôme Duval    This file is part of the GNU C Library.
4*a8344698SJérôme Duval    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
5*a8344698SJérôme Duval 
6*a8344698SJérôme Duval    The GNU C Library is free software; you can redistribute it and/or
7*a8344698SJérôme Duval    modify it under the terms of the GNU Lesser General Public
8*a8344698SJérôme Duval    License as published by the Free Software Foundation; either
9*a8344698SJérôme Duval    version 2.1 of the License, or (at your option) any later version.
10*a8344698SJérôme Duval 
11*a8344698SJérôme Duval    The GNU C Library is distributed in the hope that it will be useful,
12*a8344698SJérôme Duval    but WITHOUT ANY WARRANTY; without even the implied warranty of
13*a8344698SJérôme Duval    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14*a8344698SJérôme Duval    Lesser General Public License for more details.
15*a8344698SJérôme Duval 
16*a8344698SJérôme Duval    You should have received a copy of the GNU Lesser General Public
17*a8344698SJérôme Duval    License along with the GNU C Library; if not, see
18*a8344698SJérôme Duval    <http://www.gnu.org/licenses/>.  */
19*a8344698SJérôme Duval 
20*a8344698SJérôme Duval #include <complex.h>
21*a8344698SJérôme Duval 
22*a8344698SJérôme Duval double
__creal(double _Complex z)23*a8344698SJérôme Duval __creal (double _Complex z)
24*a8344698SJérôme Duval {
25*a8344698SJérôme Duval   return __real__ z;
26*a8344698SJérôme Duval }
27*a8344698SJérôme Duval weak_alias (__creal, creal)
28*a8344698SJérôme Duval #ifdef NO_LONG_DOUBLE
29*a8344698SJérôme Duval strong_alias (__creal, __creall)
30*a8344698SJérôme Duval weak_alias (__creal, creall)
31*a8344698SJérôme Duval #endif
32