Page 1 of 1

variables transformation

Posted: Sat Jul 04, 2015 7:22 am
by chaveslima
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

Re: variables transformation

Posted: Sat Jul 04, 2015 7:48 am
by TomDoan
1/2 is an integer divide, producing 0. Use 1.0/2.0 (or 1.0/2) to make it a real-valued divide.

Re: variables transformation

Posted: Tue Jul 07, 2015 7:58 am
by chaveslima
Great Thanks!