Datasheet

Floating-point Support
ARM DUI 0067D Copyright © 1999-2001 ARM Limited. All rights reserved. 5-5
5.2.2 Conversions between floats, doubles, and ints
The routines in Table 5-2 perform conversions between number formats, excluding
long
long
s.
Table 5-2 Number format conversion routines
Function Argument type Result type
_f2d float double
_d2f double float
_fflt int float
_ffltu unsigned int float
_dflt int double
_dfltu unsigned int double
_ffix float
int
a
a. Rounded toward zero, independently of the current rounding mode. This is because the C
standard requires implicit conversions to integers to round this way, so it is convenient not to
have to change the rounding mode to do so. Each function has a corresponding function with
_r
on the end of its name, that performs the same operation but rounds according to the current
mode.
_ffix_r float int
_ffixu float
unsigned int
a
_ffixu_r float unsigned int
_dfix double
int
a
_dfix_r double int
_dfixu double
unsigned int
a
_dfixu_r double unsigned int