use crate::define_macro::*;
define_fixdec!(FixDec16, i16, 4, 16, 15);
convert_into!(FixDec16, fixdec32, FixDec32);
convert_into!(FixDec16, fixdec64, FixDec64);
convert_into!(FixDec16, fixdec128, FixDec128);
const ALL_EXPS: [i16; 1 + 4] = [1,
10_i16.pow(1), 10_i16.pow(2), 10_i16.pow(3), 10_i16.pow(4),
];
const fn calc_mul_div(a: i16, b: i16, c: i16, rounding: Rounding) -> Option<i16> {
convert_opt_i32_to_i16(rounding_div_i32(a as i32 * b as i32, c as i32, rounding))
}
const fn calc_div_div(a: i16, b: i16, c: i16, rounding: Rounding) -> Option<i16> {
convert_opt_i32_to_i16(rounding_div_i32(a as i32, b as i32 * c as i32, rounding))
}