‎2009 Oct 09 8:10 AM
Hi Experts,
Can any one give suggestion for that
user gives formula that have all arthimatic operators and trignometric also may have
how to evaluate that and how to get the solution
formula is like
( a + b ) * ( c / b ) sin(60) + tan(45) .
in this how to get what operator is first and what operator is next
Thanks
Surendra Reddy
‎2009 Oct 09 8:25 AM
check this thread.
im not sure how much it will help you in scientific calculations
try with input.
2 + ( 3 * 6 ) + SIN(60) + TAN(45)
Edited by: Keshu Thekkillam on Oct 9, 2009 1:03 PM
‎2009 Oct 09 8:45 AM
you can.
SIN( 30 )
TAN( 45 ).see there is a space between bracket and the number
like
abc = 2 * sin( 30 ).and you total formula follows the normal mathematical order.
brackets, division, multi, plus, minus etc..
‎2009 Oct 09 8:52 AM
Hi
What Soumyaprakash told is wrong. There are some operator precedence being followed while calculating the expression.
In the expression: ( a + b ) * ( c / b ) sin(60) + tan(45), it executes in the below order
1) c/b
2) (result of step 1) * sin(60)
3) a+b
4) (result of step 3) * (result of(step 2)
5) result of step 4 + tan(45)
Regards
Rajvat
‎2009 Oct 09 8:57 AM
‎2009 Oct 09 9:50 AM
Hi Soumya
I meant that the concept behind calculation is as per mathematical precedence rule.
Rajvat