if float less than bash

C++
#Just use bc command for operational calculation as follows:
if (( $(echo "$num1 > $num2" |bc -l) )); then
  …
fi
Source

Also in C++: