Lines Matching refs:exp

75 	int exp = 0;  in simple_div()  local
87 exp++; in simple_div()
89 *micro_frac = (rem / divisor) * int_pow(10, 6 - exp); in simple_div()
93 static void split_micro_fraction(unsigned int no, int exp, int *val1, int *val2) in split_micro_fraction() argument
95 int divisor = int_pow(10, exp); in split_micro_fraction()
98 *val2 = no % divisor * int_pow(10, 6 - exp); in split_micro_fraction()
109 static void convert_from_vtf_format(u32 value, int size, int exp, in convert_from_vtf_format() argument
118 exp = hid_sensor_convert_exponent(exp); in convert_from_vtf_format()
119 if (exp >= 0) { in convert_from_vtf_format()
120 *val1 = sign * value * int_pow(10, exp); in convert_from_vtf_format()
123 split_micro_fraction(value, -exp, val1, val2); in convert_from_vtf_format()
131 static u32 convert_to_vtf_format(int size, int exp, int val1, int val2) in convert_to_vtf_format() argument
139 exp = hid_sensor_convert_exponent(exp); in convert_to_vtf_format()
140 if (exp < 0) { in convert_to_vtf_format()
141 divisor = int_pow(10, 6 + exp); in convert_to_vtf_format()
142 value = abs(val1) * int_pow(10, -exp); in convert_to_vtf_format()
145 divisor = int_pow(10, exp); in convert_to_vtf_format()
356 int scale1, int exp) in adjust_exponent_nano() argument
364 if (exp > 0) { in adjust_exponent_nano()
365 *val0 = scale0 * int_pow(10, exp); in adjust_exponent_nano()
367 if (exp > 9) { in adjust_exponent_nano()
371 for (i = 0; i < exp; ++i) { in adjust_exponent_nano()
374 res += int_pow(10, exp - 1 - i) * x; in adjust_exponent_nano()
378 *val1 = scale1 * int_pow(10, exp); in adjust_exponent_nano()
379 } else if (exp < 0) { in adjust_exponent_nano()
380 exp = abs(exp); in adjust_exponent_nano()
381 if (exp > 9) { in adjust_exponent_nano()
385 divisor = int_pow(10, exp); in adjust_exponent_nano()
389 for (i = 0; i < (9 - exp); ++i) { in adjust_exponent_nano()
392 res += int_pow(10, 8 - exp - i) * x; in adjust_exponent_nano()
395 *val1 = rem * int_pow(10, 9 - exp) + res; in adjust_exponent_nano()
407 int exp; in hid_sensor_format_scale() local
415 exp = hid_sensor_convert_exponent( in hid_sensor_format_scale()
419 unit_conversion[i].scale_val1, exp); in hid_sensor_format_scale()