variables transformation
-
chaveslima
- Posts: 18
- Joined: Mon Jun 25, 2012 3:49 pm
variables transformation
Dear Tom
Looks like RATS do not accept "/" as exponent. There is, if I do:
display 9**(0.5) it gives me 3, but if I do
display 9**(1/2) it gives me 1
I actually needed a formula like:
set interm = inter**(1/12) to calculate monthly interest from the yearly value, but it does not work
If I do interm = inter**(0.083333333) it does work, but I want to use the fraction (1/12) as exponent…
what should I do?
Ricardo
Looks like RATS do not accept "/" as exponent. There is, if I do:
display 9**(0.5) it gives me 3, but if I do
display 9**(1/2) it gives me 1
I actually needed a formula like:
set interm = inter**(1/12) to calculate monthly interest from the yearly value, but it does not work
If I do interm = inter**(0.083333333) it does work, but I want to use the fraction (1/12) as exponent…
what should I do?
Ricardo
Re: variables transformation
1/2 is an integer divide, producing 0. Use 1.0/2.0 (or 1.0/2) to make it a real-valued divide.
-
chaveslima
- Posts: 18
- Joined: Mon Jun 25, 2012 3:49 pm
Re: variables transformation
Great Thanks!