浮点形式定点模拟形式 备注
1.0FIXED_1#define FIXED_1 (1 << 11)
e^-5/300 * 1.0 = 0.92e^-5/300 * FIXED_1 = 1884#define EXP_1 1884
avenrun_f[0] * 1.0avenrun[0] = avenrun_f[0] * FIXED_1
avenrun_f[0] * 0.92

avenrun_f[0] * 0.92 * FIXED_1
= avenrun_f[0] * FIXED_1 * 0.92 * FIXED_1 / FIXED_1 =

= avenrun[0] * EXP_1 / FIXED_1

calc_load_tasks * 1.0calc_load_tasks * FIXED_1active = calc_load_tasks * FIXED_1
avenrun[0] * 0.92 + calc_load_tasks * 0.08avenrun[0] * EXP_1 / FIXED_1 +
active * (FIXED_1 - EXP_1) / FIXED_1
= ( avenrun[0] * EXP_1 + active * (FIXED_1 - EXP_1) ) / FIXED_1