I've encountered several cases where it would be nice to have a function like:
int32_t float_to_s32(float input_value, exponent_t output_exponent);
This is basically a scalar float to 32-bit fixed-point conversion.
Similar for float_s32_t to 32-bit fixed-point.