Hi,

My codewarrior version is 10.6 and studying about AN5201SW now.

In my application, I want to calculate (tFrac16 type value * 3.2767) and get result again in tFrac16 type.

tFrac16 type value is between 0 and 10,000, so I expect that it does not exceed the express range of result_value.

How can I do this? please give me a hand.

For additional explanation(in AN5201SW)

I want to calculate ((tFrac16)requiredSpeed * (float)3.2767 = (tFrac16)RESULT_VALUE) in "AppRun" step.

"SWLIBS_Typedefs.h"

typedef unsigned char tU8; /*!< unsigned 8-bit integer type */

typedef signed char tS8; /*!< signed 8-bit integer type */

typedef unsigned short tU16; /*!< unsigned 16-bit integer type */

typedef signed short tS16; /*!< signed 16-bit integer type */

typedef unsigned long tU32; /*!< unsigned 32-bit integer type */

typedef signed long tS32; /*!< signed 32-bit integer type */

typedef signed long long tS64; /*!< signed 64-bit integer type */

typedef tS16 tFrac16; /*!< 16-bit signed fractional Q1.15 type */

typedef tS32 tFrac32; /*!< 32-bit Q1.31 type */

typedef float tFloat; /*!< single precision float type */

Hi. After I posted this question, I saw that the S12Z MCUS do not support multiplication and division in float type.

Then how can I solve this problem? please give me your amazing ideas.