I am trying to calculate percentages with large numbers using the exponential notation. However, when doing this on bash using bc, I get what I presume to be is overflow errors.
For example, in bash if I do the calculation:
$ echo "6139391.0 / 2.9960647E7" | bc -l
2049151.60918664203376373104
The calculation is off. It should be 0.20491516755
.
How do I handle cases like this using bc or bash in general?