var-name-fix
This commit is contained in:
parent
9bc3710c32
commit
5c930248eb
@ -5,16 +5,16 @@ function g_num_exponential2normal {
|
|||||||
if [[ "$1" =~ e-[0-9] ]]
|
if [[ "$1" =~ e-[0-9] ]]
|
||||||
then
|
then
|
||||||
# convert
|
# convert
|
||||||
printf -v f_g_num_exponential2normal_result -- "%.12f" "$1"
|
printf -v g_num_exponential2normal_result -- "%.12f" "$1"
|
||||||
# remove ending 0
|
# remove ending 0
|
||||||
if [[ $f_g_num_exponential2normal_result =~ \. ]]
|
if [[ $g_num_exponential2normal_result =~ \. ]]
|
||||||
then
|
then
|
||||||
f_g_num_exponential2normal_result=${f_g_num_exponential2normal_result%%+(0)}
|
g_num_exponential2normal_result=${g_num_exponential2normal_result%%+(0)}
|
||||||
f_g_num_exponential2normal_result=${f_g_num_exponential2normal_result%%.}
|
g_num_exponential2normal_result=${g_num_exponential2normal_result%%.}
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
f_g_num_exponential2normal_result=$1
|
g_num_exponential2normal_result=$1
|
||||||
return 2
|
return 2
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user