Keil™, An ARM® Company

C166 User's Guide

float Errors

The C16x/ST10/XC16x does not contain an interrupt vector to trap floating-point errors. Therefore, your software must appropriately respond to these error conditions.

In addition to the normal floating-point values, a float number may contain a binary error value. These values are defined as a part of the IEEE standard and are used whenever an error occurs during normal processing of floating-point operations. Your code should check for possible arithmetic errors at the end of each floating-point operation.

NameValueMeaning
NaN0xFFFFFFFNot a number
+INF0x7F80000Positive infinity (positive overflow)
-INF0xFF80000Negative infinity (negative overflow)

Note

  • The C166 library function _chkfloat_ allows you to quickly check the floating-point status of float numbers.