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] ]]
|
||||
then
|
||||
# convert
|
||||
printf -v f_g_num_exponential2normal_result -- "%.12f" "$1"
|
||||
printf -v g_num_exponential2normal_result -- "%.12f" "$1"
|
||||
# remove ending 0
|
||||
if [[ $f_g_num_exponential2normal_result =~ \. ]]
|
||||
if [[ $g_num_exponential2normal_result =~ \. ]]
|
||||
then
|
||||
f_g_num_exponential2normal_result=${f_g_num_exponential2normal_result%%+(0)}
|
||||
f_g_num_exponential2normal_result=${f_g_num_exponential2normal_result%%.}
|
||||
g_num_exponential2normal_result=${g_num_exponential2normal_result%%+(0)}
|
||||
g_num_exponential2normal_result=${g_num_exponential2normal_result%%.}
|
||||
fi
|
||||
return 0
|
||||
else
|
||||
f_g_num_exponential2normal_result=$1
|
||||
g_num_exponential2normal_result=$1
|
||||
return 2
|
||||
fi
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user