Click here to Skip to main content
15,898,743 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
can anyone write a simple code in c# to evaluate the above.

answer should be in digits not in exponentional form
Posted
Comments
Sergey Alexandrovich Kryukov 24-Dec-11 20:21pm    
This is easy bit depends on required accuracy. What are the accuracy requirements?
--SA

Use BigInteger[^]
 
Share this answer
 
Comments
CPallini 24-Dec-11 12:16pm    
Do you use BigIntegers for real number computations?
Sergey Alexandrovich Kryukov 24-Dec-11 20:20pm    
Why not? Using some thinking, it's possible...
--SA
Sergey Alexandrovich Kryukov 24-Dec-11 20:23pm    
Anyway, I voted 5 for the answer. Actual calculation can be left for home exercise. :-)
--SA
A very straight forward thing for parsing:
A Calculation Engine for .NET[^]

Regards.
 
Share this answer
 
v2
To compute that expression use this :
An extensible math expression parser with plug-ins[^]

And to show double type results without any decimal points you should format it as this :
C#
String.Format("{0:0.}", result)


Hope it helps.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900