Learn about integer and floating-point conversions
Introduction
An introduction to integer and floating-point data types
Integer and floating-point conversions
More on implicit conversions
Data type demotions
Next Steps
Learn about integer and floating-point conversions
Who is this for?
This is an advanced topic for C/C++ developers who are interested in learning about the intricacies of conversions between floating-point numbers and integers.
What will you learn?
Upon completion of this Learning Path, you will be able to:
- Learn how to identify and fix potential problems in integer/float conversions in C/C++ on Arm
Prerequisites
Before starting, you will need the following:
- An Arm computer running Linux and a recent version of a C++ compiler (Clang or GCC) installed
Summary
This summary was drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.
Frequently asked questions
These FAQs were drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.
float or double when you need a fractional result.float z{w} can produce a diagnostic. An assignment such as float y = w usually compiles and truncates the value at runtime.