Which 'conventional' programming language a mathematician reaches for depends upon many things. One is familiarity: it is often easier and quicker in the short term to get an answer with a familiar language than with one well-suited to the job.
However, the provision of language features or libraries in a language, or the sheer amount of computation requires may also play a part.
Features of particular note include:
- support for symbolic manipulation
- numerical support of
- big integers (arbitrary size)
- (static) arbitrary precision floating point (FP)
- 'exact' numerical computation (effectively, dynamic arbitrary precision FP)
- error tracking or interval arithmetic
- complex number support
- 'natural' notation, and brevity
- ease of encapsulation
Languages of particular note are:
- ML, Haskell, ... — functional languages feel relatively natural to a mathematician; there are many to choose from, often with fundamental differences semantics (e.g., how lazy the evaluation, how strong the typing).
- Q or Pure — so-called equational languages: a variation on functional languages built upon term-rewriting rather than lambda calculus. These are excellent for customised symbolic manipulation. http://code.google.com/p/pure-lang/
- C++ — might be chosen for processing speed. This language is becoming more attractive with recent complex number support, and many useful, well-optimised mathematical libraries such as GMP, Boost/Math, Boost/uBLAS, Boost/Graph, and so on.
- Python, ... — might be chosen for ease of use combined with ability to encapsulate; there are many other scripting languages to choose from, but I suspect that mathematicians would find Python relatively attractive amongst them.