M MM2forever Active Member Licensed User Longtime User May 31, 2008 #1 Hi guys, can you tell me what gives the invalid parenthensis with this formula?: (234.67*0.434292289*Ln(6.1*exp((7.45*temp.Value)/(234.67+temp.Value)* 2.3025851)*lf.Value/100/6.1))/(7.45-0.434292289*Ln(6.1*exp((7.45* temp.Value)/(234.67+temp.Value)*2.3025851)*lf.Value/100/6.1)) Click to expand... is it the Ln function which recieves a value higher than a Double or just some wrong brackets?
Hi guys, can you tell me what gives the invalid parenthensis with this formula?: (234.67*0.434292289*Ln(6.1*exp((7.45*temp.Value)/(234.67+temp.Value)* 2.3025851)*lf.Value/100/6.1))/(7.45-0.434292289*Ln(6.1*exp((7.45* temp.Value)/(234.67+temp.Value)*2.3025851)*lf.Value/100/6.1)) Click to expand... is it the Ln function which recieves a value higher than a Double or just some wrong brackets?
D dzt Active Member Licensed User May 31, 2008 #2 MM2forever said: B4X: (234.67*0.434292289*Ln(6.1*exp((7.45*temp.Value)/(234.67+temp.Value)* 2.3025851)*lf.Value/100/6.1))/(7.45-0.434292289*Ln(6.1*exp((7.45* temp.Value)/(234.67+temp.Value)*2.3025851)*lf.Value/100/6.1)) Click to expand... :sign0085::sign0148: Why don't you try to brake it in smaller parts?
MM2forever said: B4X: (234.67*0.434292289*Ln(6.1*exp((7.45*temp.Value)/(234.67+temp.Value)* 2.3025851)*lf.Value/100/6.1))/(7.45-0.434292289*Ln(6.1*exp((7.45* temp.Value)/(234.67+temp.Value)*2.3025851)*lf.Value/100/6.1)) Click to expand... :sign0085::sign0148: Why don't you try to brake it in smaller parts?
specci48 Well-Known Member Licensed User Longtime User May 31, 2008 #3 Hi MM2forever, there is no function exp() provided by basic4ppc. Is this a custon function implemented by you? specci48
Hi MM2forever, there is no function exp() provided by basic4ppc. Is this a custon function implemented by you? specci48
klaus Expert Licensed User Longtime User May 31, 2008 #4 I suppose the exp(x) means e at the power of x. Exp is NOT a keyword in B4PPC. You must replace it with: cE^(x) this works. In the IDE Keywords are dispayed in blue, exp is in black so not a keyword. Best regards
I suppose the exp(x) means e at the power of x. Exp is NOT a keyword in B4PPC. You must replace it with: cE^(x) this works. In the IDE Keywords are dispayed in blue, exp is in black so not a keyword. Best regards
M MM2forever Active Member Licensed User Longtime User May 31, 2008 #5 uppsss... I thought replaced all exp's, but i forgot some as you see. (it used to be an excel formula) Thanks for the lead! I've corrected it to this: (234.67*0.434292289*Ln(6.1*cE^(7.45*temp.Value)/(234.67+temp.Value)* 2.3025851)* lf.Value/100/6.1))/(7.45-0.434292289*Ln(6.1*(cE^(7.45* temp.Value)/(234.67+temp.Value)*2.3025851)*lf.Value/100/6.1)) but it still gives me the same error
uppsss... I thought replaced all exp's, but i forgot some as you see. (it used to be an excel formula) Thanks for the lead! I've corrected it to this: (234.67*0.434292289*Ln(6.1*cE^(7.45*temp.Value)/(234.67+temp.Value)* 2.3025851)* lf.Value/100/6.1))/(7.45-0.434292289*Ln(6.1*(cE^(7.45* temp.Value)/(234.67+temp.Value)*2.3025851)*lf.Value/100/6.1)) but it still gives me the same error
Erel B4X founder Staff member Licensed User Longtime User May 31, 2008 #6 You should remove the bold parenthesis: (234.67*0.434292289*Ln(6.1*cE^(7.45*temp.Value)/(234.67+temp.Value)* 2.3025851)* lf.Value/100/6.1))/(7.45-0.434292289*Ln(6.1*(cE^(7.45* temp.Value)/(234.67+temp.Value)*2.3025851)*lf.Value/100/6.1))
You should remove the bold parenthesis: (234.67*0.434292289*Ln(6.1*cE^(7.45*temp.Value)/(234.67+temp.Value)* 2.3025851)* lf.Value/100/6.1))/(7.45-0.434292289*Ln(6.1*(cE^(7.45* temp.Value)/(234.67+temp.Value)*2.3025851)*lf.Value/100/6.1))
M MM2forever Active Member Licensed User Longtime User May 31, 2008 #7 hi, i finally made it: I've eased and split up the formula to this: SDD=6.1078*10^((a*temp.Value)/(b+temp.Value)) DD=lf.Value/100*SDD v=Log(DD/6.1078) TD=b*v/(a-v) (TD is the result) now it works! BTW: this formula calculates the 'dew point' from the given temperature and rel. humidity
hi, i finally made it: I've eased and split up the formula to this: SDD=6.1078*10^((a*temp.Value)/(b+temp.Value)) DD=lf.Value/100*SDD v=Log(DD/6.1078) TD=b*v/(a-v) (TD is the result) now it works! BTW: this formula calculates the 'dew point' from the given temperature and rel. humidity