OSDN Git Service

2001-07-13 Stephen M. Webb <stephen@bregmasoft.com>
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / libmath / stubs.c
1 /* Stub definitions for libmath subpart of libstdc++. */
2
3 /* Copyright (C) 2001 Free Software Foundation, Inc.
4
5    This file is part of the GNU ISO C++ Library.  This library is free
6    software; you can redistribute it and/or modify it under the
7    terms of the GNU General Public License as published by the
8    Free Software Foundation; either version 2, or (at your option)
9    any later version.
10
11    This library is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15
16    You should have received a copy of the GNU General Public License along
17    with this library; see the file COPYING.  If not, write to the Free
18    Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
19    USA.
20
21    As a special exception, you may use this file as part of a free software
22    library without restriction.  Specifically, if other files instantiate
23    templates or use macros or inline functions from this file, or you compile
24    this file and link it with other files to produce an executable, this
25    file does not by itself cause the resulting executable to be covered by
26    the GNU General Public License.  This exception does not however
27    invalidate any other reasons why the executable file might be covered by
28    the GNU General Public License.  */
29
30 #include <math.h>
31 #include <config.h>
32
33 #ifndef _GLIBCPP_HAVE_ATAN2F
34 float
35 atan2f(float x, float y)
36 {
37   return (float) atan2(x, y);
38 }
39 #endif
40
41 #if !defined(_GLIBCPP_HAVE_COSF) && !defined(_GLIBCPP_HAVE___BUILTIN_COSF)
42 float
43 cosf(float x)
44 {
45   return (float) cos(x);
46 }
47 #endif
48
49 #ifndef _GLIBCPP_HAVE_COSHF
50 float
51 coshf(float x)
52 {
53   return (float) cosh(x);
54 }
55 #endif
56
57 #ifndef _GLIBCPP_HAVE_EXPF
58 float
59 expf(float x)
60 {
61   return (float) exp(x);
62 }
63 #endif
64
65 #ifndef _GLIBCPP_HAVE_LOGF
66 float
67 logf(float x)
68 {
69   return (float) log(x);
70 }
71 #endif
72
73 #ifndef _GLIBCPP_HAVE_LOG10F
74 float
75 log10f(float x)
76 {
77   return (float) log10(x);
78 }
79 #endif
80
81 #ifndef _GLIBCPP_HAVE_POWF
82 float
83 powf(float x, float y)
84 {
85   return (float) pow(x, y);
86 }
87 #endif
88
89 #if !defined(_GLIBCPP_HAVE_SINF) && !defined(_GLIBCPP_HAVE___BUILTIN_SINF)
90 float
91 sinf(float x)
92 {
93   return (float) sin(x);
94 }
95 #endif
96
97 #ifndef _GLIBCPP_HAVE_SINHF
98 float
99 sinhf(float x)
100 {
101   return (float) sinh(x);
102 }
103 #endif
104
105 #ifndef _GLIBCPP_HAVE_SQRTF
106 float
107 sqrtf(float x)
108 {
109   return (float) sqrt(x);
110 }
111 #endif
112
113 #ifndef _GLIBCPP_HAVE_TANF
114 float
115 tanf(float x)
116 {
117   return (float) tan(x);
118 }
119 #endif
120
121 #ifndef _GLIBCPP_HAVE_TANHF
122 float
123 tanhf(float x)
124 {
125   return (float) tanh(x);
126 }
127 #endif