As you folks may know, I love math! I know almost all programming languages, but which one should I use for math. Basically, I want:

Easy type conversion
I don't care if it is object-oriented or not'
Can handle LARGE numbers
And speed!

I do not need graphical features, just math!

Recommended Answers

All 9 Replies

I don't know how you feel about it-- but I would use Perl. Perl generally has a "no limits" ideology. It's not the fastest language around, but it's really simple to learn and you can do a lot quickly with the code. It's my favorite language for solving algorithm/math problems (like those at Project Euler).

If speed becomes an issue with Perl you could always do some inline C code to try an speed it up.

commented: APL deserves double rep as far as I'm concerned! +14

Everybody is going to have their favorite.

Historically, FORTRAN has always been the language favored for hardcore scientific/math programming, and there is such a large code base out there, I doubt you will get away from it completely for a long time.

Alternately, people like the language they happen to know. I know C, C++, and Javascript, so I like writing code in those languages. Speed isn't an issue for me, and I am happy with the 16 or so decimal places of accuracy these langauges give me.

I suppose it depends on the application and intended audience. For example, if your boss tells you to program in, say, Java, that would become your favorite language.

MATLAB is another popular mathematical scripting language.

C or C++ for things that need to be pretty fast,
Python with the NumPy library for things that you would normally use Matlab for,
Fortran for things that really need to run on a supercomputer and run fast, or if you are using libraries written in Fortran,
Haskell or O'Caml for non-numerical computing math problems that are interesting and difficult.

Matlab is good for matrix manipulation and general math. Easy and quick to implement items and quite intuitive, it does differ quite dramatically from other languages such as c etc but worth a look. Only really good if performance is not a main concern as it does have a habit of eating up as much memory as it can. It also is able to manipulate images and sound easily.

its not like a programming language will take years to execute your applications, so just stick to one, learn to optimize your code, and you got what you want

Python is a lot of fun, and its quite logical in regard to math.

Python is a lot of fun, and its quite logical in regard to math.

And for maths 'batteries included' with Python nothing beats Sage.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.