fplib conversion between long longs, floats, and doubles

Table 17 describes routines to perform conversions between long longs, floats, and doubles.

Table 17. Conversion routines between long longs, floats, and doubles

FunctionArgument typesReturn type
_ll_sto_flong longfloat
_ll_uto_funsigned long longfloat
_ll_sto_dlong longdouble
_ll_uto_dunsigned long longdouble
_ll_sfrom_ffloatlong long (see Notes on rounding)
_ll_sfrom_f_rfloatlong long
_ll_ufrom_ffloatunsigned long long (see Notes on rounding)
_ll_ufrom_f_rfloatunsigned long long
_ll_sfrom_ddoublelong long (see Notes on rounding)
_ll_sfrom_d_rdoublelong long
_ll_ufrom_ddoubleunsigned long long (see Notes on rounding)
_ll_ufrom_d_rdoubleunsigned long long

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. This function has a corresponding function with _r on the end of its name. This function performs the same operation but rounds according to the current mode.

Show/hideSee also

Copyright © 2010-2012 ARM. All rights reserved.ARM DUI 0475H
Non-ConfidentialID070912