XBinder  Version 2.6.x
rtxFloat.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2003-2018 Objective Systems, Inc.
3  *
4  * This software is furnished under a license and may be used and copied
5  * only in accordance with the terms of such license and with the
6  * inclusion of the above copyright notice. This software or any other
7  * copies thereof may not be provided or otherwise made available to any
8  * other person. No title to and ownership of the software is hereby
9  * transferred.
10  *
11  * The information in this software is subject to change without notice
12  * and should not be construed as a commitment by Objective Systems, Inc.
13  *
14  * PROPRIETARY NOTICE
15  *
16  * This software is an unpublished work subject to a confidentiality agreement
17  * and is protected by copyright and trade secret law. Unauthorized copying,
18  * redistribution or other use of this work is prohibited.
19  *
20  * The above notice of copyright on this source code product does not indicate
21  * any actual or intended publication of such source code.
22  *
23  *****************************************************************************/
28 #ifndef _RTXFLOAT_H_
29 #define _RTXFLOAT_H_
30 
31 #include "rtxsrc/osSysTypes.h"
32 #include "rtxsrc/rtxExternDefs.h"
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 #ifdef _NO_ULP_EQUAL
39 
40 /* Fall back to normal equality test */
41 #define rtxFloatEqual(a, b) (a == b)
42 #define rtxFloatGreater(a, b) (a > b)
43 #define rtxFloatGreaterOrEqual(a, b) (a >= b)
44 #define rtxFloatSmaller(a, b) (a < b)
45 #define rtxFloatSmallerOrEqual(a, b) (a <= b)
46 #ifndef __SYMBIAN32__
47 #define rtxDoubleEqual(a, b) (a == b)
48 #define rtxDoubleGreater(a, b) (a > b)
49 #define rtxDoubleGreaterOrEqual(a, b) (a >= b)
50 #define rtxDoubleSmaller(a, b) (a < b)
51 #define rtxDoubleSmallerOrEqual(a, b) (a <= b)
52 #endif /* not building for Symbian */
53 
54 #else /* _NO_ULP_EQUAL */
55 
56 #define rtxFloatEqual(a, b) rtxFloatEqualImpl(a, b)
57 #define rtxFloatGreater(a, b) ((a>b) && !rtxFloatEqual(a,b))
58 #define rtxFloatGreaterOrEqual(a, b) ((a>b) || rtxFloatEqual(a,b))
59 #define rtxFloatSmaller(a, b) ((a<b) && !rtxFloatEqual(a,b))
60 #define rtxFloatSmallerOrEqual(a, b) ((a<b) || rtxFloatEqual(a,b))
61 #ifndef __SYMBIAN32__
62 #define rtxDoubleEqual(a, b) rtxDoubleEqualImpl(a, b)
63 #define rtxDoubleGreater(a, b) ((a>b) && !rtxDoubleEqual(a,b))
64 #define rtxDoubleGreaterOrEqual(a, b) ((a>b) || rtxDoubleEqual(a,b))
65 #define rtxDoubleSmaller(a, b) ((a<b) && !rtxDoubleEqual(a,b))
66 #define rtxDoubleSmallerOrEqual(a, b) ((a<b) || rtxDoubleEqual(a,b))
67 #endif /* not building for Symbian */
68 
69 #endif /* _NO_ULP_EQUAL */
70 
71 EXTERNRT OSBOOL rtxFloatEqualImpl(float a, float b);
72 
73 #ifndef __SYMBIAN32__
74 EXTERNRT OSBOOL rtxDoubleEqualImpl(double a, double b);
75 #endif
76 
77 #ifdef __cplusplus
78 }
79 #endif
80 
81 #endif /* _RTXFLOAT_H_ */
82 
Common definitions of external function modifiers used to define the scope of functions used in DLL&#39;s...