Invalid Parenthensis in Formula

Discussion in 'Questions (Windows Mobile)' started by MM2forever, May 31, 2008.

  1. MM2forever

    MM2forever Active Member Licensed User

    Hi guys,
    can you tell me what gives the invalid parenthensis with this formula?:

    is it the Ln function which recieves a value higher than a Double or just some wrong brackets?
     
  2. dzt

    dzt Active Member Licensed User

    :confused::sign0085::sign0148:

    Why don't you try to brake it in smaller parts?
     
  3. specci48

    specci48 Well-Known Member Licensed User

    Hi MM2forever,

    there is no function exp() provided by basic4ppc. Is this a custon function implemented by you?


    specci48
     
  4. klaus

    klaus Expert Licensed User

    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
     
  5. MM2forever

    MM2forever Active Member Licensed User

    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 :(
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    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))
     
  7. MM2forever

    MM2forever Active Member Licensed User

    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
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice