With dc external tool bash tend to not print at the right of the decimal point.
#!/bin/bash
a[0]=-0.5
`echo "scale=10;${a[0]}/1"|bc -l`
With the command represented above bash will print -.5000000000
.
How can I add the zero between the minus signal and the point -0.5000000000
PS: I do print a[1]=0
with 10 decimal cases?