|
|||||||||||
Technical Support Support Resources
Product Information |
C166: Floating-point SupportInformation in this article applies to:
QUESTIONWe are changing software that currently uses integer math to use floating-point math. Does the Keil C166 Compiler support floating-point math and are there include files or libraries we need to declare in order for it to compile successfully with float variables? ANSWERThe C166 compiler supports both single-precision (32-bit) and double-precision (64-bit) floating-point. To use either, all you have to do is start declaring and using floating-point variables just like in ANSI C. By default, all float and double variables are stored in 32-bit IEEE format. This gives a precision of 7 decimal digits. When you require higher precision (than 7 digits) you may use the C166 FLOAT64 directive to enable 64-bit doubles. Enable this option in µVision under Project - Options for Target - C166 - Double-precision floating-point. If you enable FLOAT64, all double variables are stored in 64-bit IEEE format. This provides a precision of 15 decimal digits. MORE INFORMATION
Last Reviewed: Thursday, February 25, 2021 | ||||||||||
|
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.