OSDN Git Service

first commit
[winexe-harib/winexe-harib.git] / include / math.h
1 /* copyright(C) 2003 H.Kawai (under KL-01). */
2
3 #if (!defined(MATH_H))
4
5 #define MATH_H  1
6
7 #if (defined(__cplusplus))
8         extern "C" {
9 #endif
10
11 double sin(double);
12 double cos(double);
13 double sqrt(double);
14 double ldexp(double x, int n);
15 double frexp(double x, int *exp);
16
17 extern __inline__ double sin(double x)
18 {
19         double res;
20         __asm__ ("fsin" : "=t" (res) : "0" (x));
21         return res;
22 }
23
24 extern __inline__ double cos(double x)
25 {
26         double res;
27         __asm__ ("fcos" : "=t" (res) : "0" (x));
28         return res;
29 }
30
31 extern __inline__ double sqrt(double x)
32 {
33         double res;
34         __asm__ ("fsqrt" : "=t" (res) : "0" (x));
35         return res;
36 }
37
38 #if (defined(__cplusplus))
39         }
40 #endif
41
42 #endif