I think it's the if statements bombing out because bash can only do integers.
You can try something like this:
if [ $(echo "scale=6; if($VariableEnd > $VariableBegin) print "1" " | bc) ]; then
echo "Hello, there, dude"
#The print "1" doesn't seem do anything apart from stopping bc complaing (no expert you see) although the if statement appears at
#first sight to evaluate correctly, don't ask me the technical reasons why