11.07.2015 Views

MSP430 IAR C/C++ Compiler reference guide - Rice University

MSP430 IAR C/C++ Compiler reference guide - Rice University

MSP430 IAR C/C++ Compiler reference guide - Rice University

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Data representation64-bit floating-point formatThe representation of a 64-bit floating-point number as an integer is:63 62 52 51 0S Exponent MantissaThe exponent is 11 bits, and the mantissa is 52 bits.The value of the number is:(-1) S * 2 (Exponent-1023) * 1.MantissaThe range of the number is:±2.23E-308 to ±1.79E+308The precision of the float operators (+, -, *, and /) is approximately 15 decimal digits.Representation of special floating-point numbersThe following list describes the representation of special floating-point numbers:● Zero is represented by zero mantissa and exponent. The sign bit signifies positive ornegative zero.● Infinity is represented by setting the exponent to the highest value and the mantissato zero. The sign bit signifies positive or negative infinity.● Not a number (NaN) is represented by setting the exponent to the highest positivevalue and the mantissa to a non-zero value. The value of the sign bit is ignored.Note: The <strong>IAR</strong> CLIB Library does not fully support the special cases of floating-pointnumbers, such as infinity and NaN. A library function which gets one of these specialcases of floating-point numbers as an argument may behave unexpectedly.Pointer typesThe <strong>MSP430</strong> <strong>IAR</strong> C/<strong>C++</strong> <strong>Compiler</strong> has two basic types of pointers: function pointersand data pointers.FUNCTION POINTERSFor the <strong>MSP430</strong> architecture, function pointers are always 16 bits. For the <strong>MSP430</strong>Xarchitecture, function pointers are 20 bits (4 bytes when stored in memory) and they canaddress the entire 1 Mbyte of memory.Part 2. <strong>Compiler</strong> <strong>reference</strong>173

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!