Hi, you can put the forumula in the front panel. In the fuction menu, goto "Mathematics", choose "formula" and then choose "Advance Formula Parsing". From there you will see several function which you are looking for. Look at the attached vi for protecting your formula. Thats the basic idea and I am sure you can enhance it to your application. May be better idea would come out in a few moments. Hope my suggestion would help you.
------------------------------------------------------------------
When you feel sad, laugh