fplib conversions between floats, doubles, and ints

Table 16 describes routines to perform conversions between number formats, excluding long long types.

Table 16. Number format conversion routines

FunctionArgument typesReturn type
__aeabi_f2dfloatdouble
__aeabi_d2fdoublefloat
_ffltintfloat
_ffltuunsigned intfloat
_dfltintdouble
_dfltuunsigned intdouble
_ffixfloatint (see Notes on rounding)
_ffix_rfloatint
_ffixufloatunsigned int (see Notes on rounding)
_ffixu_rfloatunsigned int
_dfixdoubleint (see Notes on rounding)
_dfix_rdoubleint
_dfixudoubleunsigned int (see Notes on rounding)
_dfixu_rdoubleunsigned int

Show/hideNotes on rounding

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.

Show/hideSee also

Copyright © 2010-2011 ARM. All rights reserved.ARM DUI 0475C
Non-ConfidentialID080411