-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmath.h
More file actions
42 lines (33 loc) · 649 Bytes
/
math.h
File metadata and controls
42 lines (33 loc) · 649 Bytes
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
/* copyright(C) 2003 H.Kawai (under KL-01). */
#if (!defined(MATH_H))
#define MATH_H 1
#if (defined(__cplusplus))
extern "C" {
#endif
double sin(double);
double cos(double);
double sqrt(double);
double ldexp(double x, int n);
double frexp(double x, int *exp);
extern __inline__ double sin(double x)
{
double res;
__asm__ ("fsin" : "=t" (res) : "0" (x));
return res;
}
extern __inline__ double cos(double x)
{
double res;
__asm__ ("fcos" : "=t" (res) : "0" (x));
return res;
}
extern __inline__ double sqrt(double x)
{
double res;
__asm__ ("fsqrt" : "=t" (res) : "0" (x));
return res;
}
#if (defined(__cplusplus))
}
#endif
#endif