Calculator.NET - Calculator that evaluates math expressions

I'd like to announce the release of a little project I've been working on.  I call it Calculator.NET.  I started this project for a couple reasons.  First, I was annoyed that Windows Vista doesn't come with a better calculator.  Windows XP has Power Calculator, but that doesn't work on Vista.  Next, I was reading a blog about DynCalc by Bart De Smet on how to do mathematical calculations. That gave me the starting point on how to create Calculator.NET. 

As part of the project, I created a MathExpressions library that does the bulk of work.  The library supports math expressions, functions unit conversion and variables. Below are some examples of using the library directly.

MathEvaluator eval = new MathEvaluator();
//basic math
double result = eval.Evaluate("(2 + 1) * (1 + 2)");
//calling a function
result = eval.Evaluate("sqrt(4)");
//evaluate trigonometric
result = eval.Evaluate("cos(pi * 45 / 180.0)");
//convert inches to feet
result = eval.Evaluate("12 [in->ft]");
//use variable
result = eval.Evaluate("answer * 10");
//add variable
eval.Variables.Add("x", 10);
result = eval.Evaluate("x * 10");

Calculator that evaluates math expressions.
Calculator.NET

Calculator.NET Features

  • Evaluate math expressions including grouping
  • Support trigonometry and other function
  • Common unit conversion of the following types
    • Length
    • Mass
    • Speed
    • Temperature
    • Time
    • Volume
  • Variable support including last answer

Download Calculator.NET

Published Saturday, May 5, 2007 4:38 PM by pwelter34

Comments

# re: Calculator.NET - Calculator that evaluates math expressions

Finally!!! I love it.. I mean I really love it..

here's a tip: you don't have to type in "answer".. you can just press * or + or whatever and it gets entered automatically.. cool!

thank you

Thursday, August 9, 2007 10:17 PM by David

# re: Calculator.NET - Calculator that evaluates math expressions

Does this works with PPC??

PS: Thanks anyway... ;)

Thursday, April 24, 2008 6:22 AM by Tucs

# re: Calculator.NET - Calculator that evaluates math expressions

Very nice application, the cleanest implementation I have found.

Thank you.

Thursday, July 31, 2008 6:00 PM by ardalanr

# re: Calculator.NET - Calculator that evaluates math expressions

Does anyone know if there exists a web implementation of this app?

Furthermore it has some quite interesting results:

sqrt(2)*2 = 2

3^2*2 = 81

It seems as if there are some problems here evaluating in the right order?

Monday, September 22, 2008 11:08 AM by Jean

# re: Calculator.NET - Calculator that evaluates math expressions

What license is this library licensed under? Can I release it with my open-source project?

Thursday, October 16, 2008 9:35 AM by gyurisc

# re: Calculator.NET - Calculator that evaluates math expressions

Hello webmaster,

I would like to share with you a link, write to alarroste@mail.ru

Wednesday, February 18, 2009 1:45 AM by alarroste