F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
BasicTypes.hpp
Go to the documentation of this file.
1 
11 #include <limits>
12 // Use C linkage for the basic items
13 extern "C" {
14 #include "BasicTypes.h"
15 }
16 
17 #ifndef FW_BASIC_TYPES_HPP
18 #define FW_BASIC_TYPES_HPP
19 
20 // IEEE compliance checks must occur in C++ code
21 #if !defined(SKIP_FLOAT_IEEE_754_COMPLIANCE) || !SKIP_FLOAT_IEEE_754_COMPLIANCE
22 static_assert((std::numeric_limits<float>::is_iec559 == true) && (std::numeric_limits<float>::radix == 2) &&
23  (std::numeric_limits<float>::digits == 24) && (std::numeric_limits<float>::max_exponent == 128),
24  "The 32-bit floating point type does not conform to the IEEE-754 standard.");
25 #if FW_HAS_F64
26 static_assert((std::numeric_limits<double>::is_iec559 == true) && (std::numeric_limits<double>::radix == 2) &&
27  (std::numeric_limits<double>::digits == 53) && (std::numeric_limits<double>::max_exponent == 1024),
28  "The 64-bit floating point type does not conform to the IEEE-754 standard.");
29 #endif
30 #endif
31 #endif // End FW_BASIC_TYPES_HPP