I want to do some fairly serious math, including complex numbers arithmetic. I used to work in C++ by Borland.
Question 1. Can I add a complex number class to the capability of Visual C# Express Edition? Q2: Where can I download a class if its possible? Q3: Am I using the right programming language if I want to do serious Mathematics?
AlanPosted Jan 22, 2008, 12:25 PM
Well, Visual Studio 2008 is available now, including the free Express editions:
http://www.microsoft.com/express/product/default.aspx
and is well worth the upgrade for the new features you get in the C# language alone (notably LINQ).
There's a comparison here between the Standard and Professional editions:
http://msdn2.microsoft.com/en-us/vs2008/products/bb980920.aspx
Although I use the Professional edition at work, I've always found the Standard edition to be perfectly adequate for personal use though I'm beginning to wonder whether even that is worth paying paying for when the Express editions are now so good.
As there are no deficiencies in the language or .NET framework when you use Visual C# Express, I'd be inclined to start with that and see if it does what you want.
There are some math library products listed here, ranging from open source to very expensive:
http://sharptoolbox.com/categories/math-logic-ai-rules
Mauri PeltoPosted Jan 22, 2008, 11:13 AM
AlanPosted Jan 21, 2008, 3:55 PM
Although there isn't a complex number class in the .NET Framework, there's one here which was written by Eric Gunnerson one of the original team who designed C#:
http://www.java2s.com/Code/CSharp/Language-Basics/AComplexNumberClass.htm
Although you can do serious mathematics in C#, support in the .NET Framework itself is poor and you have to look around for suitable classes (or purchase a mathematics library) if you don't want to have to code everything yourself from scratch.
You might like to take a look at the Microsoft research language, F# which, in my view, is better in this respect as it includes its own libraries as well as being able to use the .NET Framework. It was recently announced that this language is going to be included in the next version of Visual Studio:
http://research.microsoft.com/fsharp/fsharp.aspx
However, as you'll gather, this is a functional language from the same family as ML and is a bit of a culture shock for folks, like you and me, who are used to imperative languages such as C++ and C#.