I try to perform this simple calculation, but the programm always gives me incorrect results. If I use only integers, then I get 96
var=$(((100/24)*24))
even if I try to use bc:
var=$(bc <<< "scale=100;100/24*24")
I get something like this: 99.99999999999999999999999999999999999999999999999999999999999999999 99999999999999999999999999999999984;
How to let make the program count the correct way? So that I could get the same values as from the calculator?