blob: c4a330e0f32452dc7143061cde042dd89bb1458a (
plain) (
blame)
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
|
/***
*frnd.c -
*
* Copyright (c) 1991-91, Microsoft Corporation
*
*Purpose:
*
*
*Revision History:
*
* 10-20-91 GDP written
*/
/***
*double _frnd(double x) - round to integer
*
*Purpose:
* Round to integer according to the current rounding mode.
* NaN's or infinities are NOT handled
*
*Entry:
*
*Exit:
*
*Exceptions:
*******************************************************************************/
double _frnd(double x)
{
double result;
#if defined i386 || defined _X86SEG_
_asm {
fld x
frndint
fstp result
}
#else
#error Only 386 platform supported
#endif
return result;
}
|