Page 1 of 1

negative float variable

Posted: Fri May 21, 2010 7:50 am
by Kumaran
i need to use an negative float variable in my program,
Program:
C1=-4.0;
C2=+0.0405;
C3=-0.0000028;
T1=+0.01;
T2=+0.00008;
rh_lin=C3*rh*rh + C2*rh + C1;
rh_true=(t_C-25)*(T1+T2*rh)+rh_lin
....
likewise,i'm able to get this executed in flowcode,BUT when loading in the simulator, the C1,C2,C3 are getting assigned as zero resulting the main result also as "0." what could be the reason ? :?:

Re: negative float variable

Posted: Fri May 21, 2010 9:24 am
by Benj
Hello,

If your using the BoostC compiler then you need to use the floating point funcions located inside the calculation icon properties. There are lots of examples of floats using BoostC available on the forum. The HiTech compiler deals with Float variables a bit better and you do not have to use the functions with this.