Subversion Repositories Kolibri OS

Rev

Rev 1005 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1005 Rev 1764
Line 16... Line 16...
16
#define ERR_BADVARIABLE -5
16
#define ERR_BADVARIABLE -5
17
#define ERR_OVERFLOW -6
17
#define ERR_OVERFLOW -6
18
 
18
 
19
double tg(double d)
19
double __cdecl tg(double d)
Line 20... Line 20...
20
{
20
{
21
	return sin(d) / cos(d);
21
	return sin(d) / cos(d);
22
}
22
}
23
 
23
 
Line 24... Line 24...
24
double ctg(double d)
24
double __cdecl ctg(double d)
25
{
25
{
26
	return cos(d) / sin(d);
26
	return cos(d) / sin(d);
27
}
27
}
Line 28... Line 28...
28
 
28
 
29
double exp(double x)
29
double __cdecl exp(double x)
30
{
30
{
31
	__asm {
31
	__asm {
32
		fld	x 
32
		fld	x 
33
		FLDL2E
33
		FLDL2E
Line 47... Line 47...
47
	
47
	
48
}
48
}
Line 49... Line 49...
49
 
49
 
Line 50... Line 50...
50
double log(double x)
50
double __cdecl log(double x)
51
{
51
{
52
	//return 0.0;
52
	//return 0.0;
53
	__asm {
53
	__asm {
54
		FLD1
54
		FLD1
55
		FLD     x
55
		FLD     x
Line 59... Line 59...
59
	}
59
	}
60
}
60
}
61
 
61
 
62
double sqrt(double x)
62
double __cdecl sqrt(double x)
Line 63... Line 63...
63
{
63
{
64
	__asm {
64
	__asm {
65
		fld x
65
		fld x
66
		fsqrt
66
		fsqrt
67
	}
67
	}
68
}
68
}
69
 
69
 
Line 70... Line 70...
70
double atan(double x)
70
double __cdecl atan(double x)
71
{
71
{
72
	return 0.0; // â ëîì
72
	return 0.0; // â ëîì
73
}
73
}
Line 74... Line 74...
74
 
74
 
Line 79... Line 79...
79
 
79
 
80
 
80
 
Line 81... Line 81...
81
// represents general mathematical function
81
// represents general mathematical function
82
typedef double(*matfunc)(double);
82
typedef double(__cdecl*matfunc)(double);
Line 83... Line 83...
83
 
83
 
84
// used to link function name to the function
84
// used to link function name to the function
85
typedef struct  
85
typedef struct  
86
{
86
{