source: mainline/uspace/lib/posix/source/math.c@ b5851913

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since b5851913 was 820104d, checked in by Vojtech Horky <vojtechhorky@…>, 12 years ago

libposix: do not die in unimplemented function, just warn

  • Property mode set to 100644
File size: 3.5 KB
Line 
1/*
2 * Copyright (c) 2011 Petr Koupy
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * - The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29/** @addtogroup libposix
30 * @{
31 */
32/** @file Mathematical operations.
33 */
34
35#define LIBPOSIX_INTERNAL
36#define __POSIX_DEF__(x) posix_##x
37
38#include "internal/common.h"
39#include "posix/math.h"
40
41/**
42 *
43 * @param x
44 * @param exp
45 * @return
46 */
47double posix_ldexp(double x, int exp)
48{
49 // TODO: low priority, just a compile-time dependency of binutils
50 not_implemented();
51 return 0.0;
52}
53
54/**
55 *
56 * @param num
57 * @param exp
58 * @return
59 */
60double posix_frexp(double num, int *exp)
61{
62 // TODO: low priority, just a compile-time dependency of binutils
63 not_implemented();
64 return 0.0;
65}
66
67/**
68 *
69 * @param x
70 * @return
71 */
72double posix_cos(double x)
73{
74 // TODO: Python dependency
75 not_implemented();
76 return 0.0;
77}
78
79/**
80 *
81 * @param x
82 * @param y
83 * @return
84 */
85double posix_pow(double x, double y)
86{
87 // TODO: Python dependency
88 not_implemented();
89 return 0.0;
90}
91
92/**
93 *
94 * @param x
95 * @return
96 */
97double posix_floor(double x)
98{
99 // TODO: Python dependency
100 not_implemented();
101 return 0.0;
102}
103
104/**
105 *
106 * @param x
107 * @return
108 */
109double posix_fabs(double x)
110{
111 // TODO: Python dependency
112 not_implemented();
113 return 0.0;
114}
115
116/**
117 *
118 * @param x
119 * @param iptr
120 * @return
121 */
122double posix_modf(double x, double *iptr)
123{
124 // TODO: Python dependency
125 not_implemented();
126 return 0.0;
127}
128
129/**
130 *
131 * @param x
132 * @param y
133 * @return
134 */
135double posix_fmod(double x, double y)
136{
137 // TODO: Python dependency
138 not_implemented();
139 return 0.0;
140}
141
142/**
143 *
144 * @param x
145 * @return
146 */
147double posix_log(double x)
148{
149 // TODO: Python dependency
150 not_implemented();
151 return 0.0;
152}
153
154/**
155 *
156 * @param x
157 * @param y
158 * @return
159 */
160double posix_atan2(double y, double x)
161{
162 // TODO: Python dependency
163 not_implemented();
164 return 0.0;
165}
166
167/**
168 *
169 * @param x
170 * @return
171 */
172double posix_sin(double x)
173{
174 // TODO: Python dependency
175 not_implemented();
176 return 0.0;
177}
178
179/**
180 *
181 * @param x
182 * @return
183 */
184double posix_exp(double x)
185{
186 // TODO: Python dependency
187 not_implemented();
188 return 0.0;
189}
190
191/**
192 *
193 * @param x
194 * @return
195 */
196double posix_sqrt(double x)
197{
198 // TODO: Python dependency
199 not_implemented();
200 return 0.0;
201}
202
203/** @}
204 */
Note: See TracBrowser for help on using the repository browser.