Subversion Repositories Kolibri OS

Rev

Rev 1005 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1005 Rev 1764
Line 1... Line 1...
1
#include 
1
#include 
2
#include "kosSyst.h"
2
#include "kosSyst.h"
3
extern "C" int _fltused = 0;
3
extern "C" int _fltused = 0;
4
double acos(double x)
4
double __cdecl acos(double x)
5
{
5
{
6
	__asm {
6
	__asm {
7
		fld	qword ptr [esp+4]
7
		fld	qword ptr [esp+4]
8
		fld1
8
		fld1
9
		fadd	st, st(1)
9
		fadd	st, st(1)
Line 13... Line 13...
13
		fsqrt
13
		fsqrt
14
		fxch	st(1)
14
		fxch	st(1)
15
		fpatan
15
		fpatan
16
	}
16
	}
17
}
17
}
18
double asin(double x)
18
double __cdecl asin(double x)
19
{
19
{
20
	__asm {
20
	__asm {
21
		fld	qword ptr [esp+4]
21
		fld	qword ptr [esp+4]
22
		fld1
22
		fld1
23
		fadd	st, st(1)
23
		fadd	st, st(1)
Line 41... Line 41...
41
		fldcw	word ptr [esp+2]
41
		fldcw	word ptr [esp+2]
42
		add	esp, 4
42
		add	esp, 4
43
	}
43
	}
44
}
44
}
45
#endif
45
#endif
46
double ceil(double x)
46
double __cdecl ceil(double x)
47
{
47
{
48
	__asm {
48
	__asm {
49
		fld	qword ptr [esp+4]
49
		fld	qword ptr [esp+4]
50
		push	1B3Fh
50
		push	1B3Fh
51
		fstcw	word ptr [esp+2]
51
		fstcw	word ptr [esp+2]
Line 54... Line 54...
54
		fldcw	word ptr [esp+2]
54
		fldcw	word ptr [esp+2]
55
		add	esp, 4
55
		add	esp, 4
56
	}
56
	}
57
}
57
}
Line 58... Line 58...
58
 
58
 
59
double floor(double x)
59
double __cdecl floor(double x)
60
{
60
{
61
	__asm {
61
	__asm {
62
		fld	qword ptr [esp+4]
62
		fld	qword ptr [esp+4]
63
		push	173Fh
63
		push	173Fh
Line 67... Line 67...
67
		fldcw	word ptr [esp+2]
67
		fldcw	word ptr [esp+2]
68
		add	esp, 4
68
		add	esp, 4
69
	}
69
	}
70
}
70
}
Line 71... Line 71...
71
 
71
 
72
double round(double x)
72
double __cdecl round(double x)
73
{
73
{
74
	__asm {
74
	__asm {
75
		fld	qword ptr [esp+4]
75
		fld	qword ptr [esp+4]
76
		push	133Fh
76
		push	133Fh