I'm using an expression object here to attempt a very simple task, to multiply a variable by a fractional ratio. In the process, I have run into this trouble:
I create a number object and feed it into [expr $f1*(25/24)], but I only receive my variable back to me as output (as if it was merely being multiplied by 1, rather than by the fraction). So I do some testing, and find what does and does not seem to work:
My question is: Why?
Why is it that { 25 -> [expr $f1/24] => 1.041 } works but [expr 25/24] does not and returns 1. It seems like the expression object is rounding to the nearest integer, but that does not make sense.
1 -> [expr (25*$f1)/24] => 1.041 Works.
1 -> [expr (25/24)*$f1] => 1 does Not.
~
I know it's a dull question, so I appreciate you in helping me to understand. I want to understand, so that I can avoid the frustration later.
PEACE