1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 8.0.0.0 for Windows">
7<META http-equiv="Content-Style-Type" content="text/css">
8<title>fx64c Type Macros</title>
9<LINK rel="stylesheet" href="../css/nitro.css" type="text/css">
10</head>
11
12<body>
13
14<h1 align="left">fx64c Type Macros <img src="../image/NTR.gif"align="middle"><img src="../image/TWL.gif" align="middle"></h1>
15<h2>Description</h2>
16<TABLE border="0" width="100%">
17  <TBODY>
18    <TR>
19      <TD width="153">FX64C_SHIFT</TD>
20      <TD width="469">Defines the shift number (32) for <CODE>fx64c</CODE> types.</TD>
21    </TR>
22    <TR>
23      <TD width="153">FX64C_INT_SIZE</TD>
24      <TD width="469">Defines the bit width of the integer portion (31) for <CODE>fx64c</CODE> types.</TD>
25    </TR>
26    <TR>
27      <TD width="153">FX64C_DEC_SIZE</TD>
28      <TD width="469">Defines the bit width for the decimal portion (32) for <CODE>fx64c</CODE> types.</TD>
29    </TR>
30    <TR>
31      <TD width="153">FX64C_INT_MASK</TD>
32      <TD width="469">Defines the mask (<CODE>0x7fffffff00000000</CODE>) for the integer portion of <CODE>fx64c</CODE> types.</TD>
33    </TR>
34    <TR>
35      <TD width="153">FX64C_DEC_MASK</TD>
36      <TD width="469">Defines the mask (<CODE>0x00000000ffffffff</CODE>) for the decimal portion of <CODE>fx64c</CODE> types.</TD>
37    </TR>
38    <TR>
39      <TD width="153">FX64C_SIGN_MASK</TD>
40      <TD width="469">Defines the mask (<CODE>0x8000000000000000</CODE>) for the sign portion of <CODE>fx64c</CODE> types.</TD>
41    </TR>
42    <TR>
43      <TD width="153">FX64C_MAX</TD>
44      <TD width="469">Defines the maximum value that can be obtained with <CODE>fx64c</CODE> types.</TD>
45    </TR>
46    <TR>
47      <TD width="153">FX64C_MIN</TD>
48      <TD width="469">Defines the minimum value that can be obtained with <CODE>fx64c</CODE> types.</TD>
49    </TR>
50    <TR>
51      <TD>FX_FX64C_TO_F32</TD>
52      <TD>Converts an fx64c type to an f32 type.</TD>
53    </TR>
54    <TR>
55      <TD>FX_F32_TO_FX64C<BR>
56      FX64C_CONST</TD>
57      <TD>Converts an f32 type to an fx64 type.</TD>
58    </TR>
59  </TBODY>
60</TABLE>
61<H2>Macro Definitions</H2>
62<PRE><CODE>#define FX64C_SHIFT          32
63#define FX64C_INT_SIZE       31
64#define FX64C_DEC_SIZE       32
65
66#define FX64C_INT_MASK       ((fx64c)0x7fffffff00000000)
67#define FX64C_DEC_MASK       ((fx64c)0x00000000ffffffff)
68#define FX64C_SIGN_MASK      ((fx64c)0x8000000000000000)
69
70#define FX64C_MAX            ((fx64c)0x7fffffffffffffff)
71#define FX64C_MIN            ((fx64c)0x8000000000000000)
72#define FX_FX64C_TO_F32(x)   ((f32)((x) / (f32)(1 &lt;&lt; FX64C_SHIFT)))
73#define FX_F32_TO_FX64C(x)   ((fx64c)(((x) &gt; 0) ? \
74                                      ((x) * ((fx64c)1 &lt;&lt; FX64C_SHIFT) + 0.5f ) : \
75                                      ((x) * ((fx64c)1 &lt;&lt; FX64C_SHIFT) - 0.5f )))
76
77#define FX64C_CONST(x)      FX_F32_TO_FX64C(x)</CODE></PRE>
78<H2>Revision History</H2>
79<P>2004/02/25 Initial version.</P>
80<hr><p>CONFIDENTIAL</p></body>
81</html>
82