summaryrefslogtreecommitdiff
path: root/toolchain/libnotimpl/src/math.c
blob: 5bfcb9532ef8041921f6b464cb0e5aa4ce5f0d26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/* vi: set sw=4 ts=4: */

#include "math.h"


/* cosf for uClibc
 *
 * wrapper for cos(x)
 */

#ifdef __STDC__
	float cosf(float x)
#else
	float cosf(x)
	float x;
#endif
{
	return (float) cos( (double)x );
}


/* sinf for uClibc
 *
 * wrapper for sin(x)
 */

#ifdef __STDC__
	float sinf(float x)
#else
	float sinf(x)
	float x;
#endif
{
	return (float) sin( (double)x );
}


/* ceilf for uClibc
 *
 * wrapper for ceil(x)
 */

#ifdef __STDC__
	float ceilf(float x)
#else
	float ceilf(x)
	float x;
#endif
{
	return (float) ceil( (double)x );
}


/* rintf for uClibc
 *
 * wrapper for rint(x)
 */

#ifdef __STDC__
	float rintf(float x)
#else
	float rintf(x)
	float x;
#endif
{
	return (float) sin( (double)x );
}