It's partly the way you defined your numbers and it's the way Kix generally handles numbers. It can be worked around though.

FTR, if you had tried $bar / $foo it would have worked.

You can define a number as Double to avoid the problem. So instead of 5 you can define as 5.0. Or you can use the function CDBL to do it, ie CDBL($foo).