diff --git a/gaboshlib/g_num_is_approx.sh b/gaboshlib/g_num_is_approx.sh index 3b5ebf7..c206d14 100644 --- a/gaboshlib/g_num_is_approx.sh +++ b/gaboshlib/g_num_is_approx.sh @@ -10,8 +10,8 @@ function g_num_is_approx { g_num_valid_number "${f_num}" "${f_base}" "${f_percentage_up}" "${f_percentage_down}" || return 1 - local f_from=$(echo "${f_base} - (${f_base} / 100 * ${f_percentage_down})" | bc -l) - local f_to=$(echo "${f_base} + (${f_base} / 100 * ${f_percentage_up})" | bc -l) + local f_from=$(g_calc "${f_base} - (${f_base} / 100 * ${f_percentage_down})") + local f_to=$(g_calc "${f_base} + (${f_base} / 100 * ${f_percentage_up})") g_num_is_between ${f_num} ${f_from} ${f_to} }