Skip to main content
Post Made Community Wiki by S. Carnahan
added 1638 characters in body
Source Link
Vít Tuček
  • 8.6k
  • 2
  • 30
  • 61

It is not entirely clear to me what are you looking for and why.

If you want the best performance you are almost surely bound to use compiled language such as Fortran[1]Fortran1, C++ or C. Of course, you can always use almost any "higher level language" such as Python, Ruby or whatnot to glue together routines from libraries written in some "low level language" as C, Fortran, etc. Octave, Matlab and Sage come to mind. NumPy is quite good example of this approach, since almost all of its core functions are written in C (i.e. LAPACK).

If, on the other hand, you want to experiment with algorithms themselves, you can implement them in Haskell or (oca)ML or some other "mathematicians friendly" language. Also, succinct syntax and lack of side effects means it's much easier to prove correctness. Moreover there are area specific systems/languages as LiE, Macaulay2, Singular, GAP, ...

Writing basic routines (such as those from Numerical Recipes) in any other language than C, C++ or Fortran means that

  • you are doing an exercise
  • you are trying to solve a problem in a language where you can't use functions from libraries written in C/C++/Fortran
  • you need numerical routines in a big (i.e. not feasible to rewrite in C/C++/Fortran) project where calling an external library causes unwanted overhead (this can be the case for example with Java).

[1]1 Please note that modern Fortran is quite high level language with functional and object-oriented features.

edit:

I am not a Fortran programmer myself, so what follows are information relayed from a friend of mine (physicist and active Fortran programmer). I realize that this is not what you are asking for, but it may be helpful nevertheless.

books:

When starting, it's best to learn Fortran 95/90 first. For a gentle introduction see http://www.cs.mtu.edu/~shene/COURSES/cs201/NOTES/fortran.html

For an overview of the language see http://en.wikipedia.org/wiki/Fortran_language_features (mostly written by Michael Metcalf; see the book above).

As for OOP, it was possible in Fortran 95 using various hacks, but another revision of the language (Fortran 2003) included OOP features into the language norm itself. For technical account on Fortran 2003 features see ftp://ftp.nag.co.uk/sc22wg5/N1551-N1600/N1579.pdf For tutorial on OOP in Fortran 2003 see http://www.pgroup.com/lit/articles/insider/v3n1a3.htm and http://www.pgroup.com/lit/articles/insider/v3n2a2.htm

Fortran is still evolving, the latest standard being Fortran 2008 which introduced concurrent programming techniques:
http://www.training.prace-ri.eu/uploads/tx_pracetmo/coarrayvideo1.pdf
http://www.training.prace-ri.eu/uploads/tx_pracetmo/coarrayvideo2.pdf
http://www.training.prace-ri.eu/uploads/tx_pracetmo/coarrayvideo3.pdf

I should add that there probably isn't a compiler that supports all the features of the standard (2003).

It is not entirely clear to me what are you looking for and why.

If you want the best performance you are almost surely bound to use compiled language such as Fortran[1], C++ or C. Of course, you can always use almost any "higher level language" such as Python, Ruby or whatnot to glue together routines from libraries written in some "low level language" as C, Fortran, etc. Octave, Matlab and Sage come to mind. NumPy is quite good example of this approach, since almost all of its core functions are written in C (i.e. LAPACK).

If, on the other hand, you want to experiment with algorithms themselves, you can implement them in Haskell or (oca)ML or some other "mathematicians friendly" language. Also, succinct syntax and lack of side effects means it's much easier to prove correctness. Moreover there are area specific systems/languages as LiE, Macaulay2, Singular, GAP, ...

Writing basic routines (such as those from Numerical Recipes) in any other language than C, C++ or Fortran means that

  • you are doing an exercise
  • you are trying to solve a problem in a language where you can't use functions from libraries written in C/C++/Fortran
  • you need numerical routines in a big (i.e. not feasible to rewrite in C/C++/Fortran) project where calling an external library causes unwanted overhead (this can be the case for example with Java).

[1] Please note that modern Fortran is quite high level language with functional and object-oriented features.

It is not entirely clear to me what are you looking for and why.

If you want the best performance you are almost surely bound to use compiled language such as Fortran1, C++ or C. Of course, you can always use almost any "higher level language" such as Python, Ruby or whatnot to glue together routines from libraries written in some "low level language" as C, Fortran, etc. Octave, Matlab and Sage come to mind. NumPy is quite good example of this approach, since almost all of its core functions are written in C (i.e. LAPACK).

If, on the other hand, you want to experiment with algorithms themselves, you can implement them in Haskell or (oca)ML or some other "mathematicians friendly" language. Also, succinct syntax and lack of side effects means it's much easier to prove correctness. Moreover there are area specific systems/languages as LiE, Macaulay2, Singular, GAP, ...

Writing basic routines (such as those from Numerical Recipes) in any other language than C, C++ or Fortran means that

  • you are doing an exercise
  • you are trying to solve a problem in a language where you can't use functions from libraries written in C/C++/Fortran
  • you need numerical routines in a big (i.e. not feasible to rewrite in C/C++/Fortran) project where calling an external library causes unwanted overhead (this can be the case for example with Java).

1 Please note that modern Fortran is quite high level language with functional and object-oriented features.

edit:

I am not a Fortran programmer myself, so what follows are information relayed from a friend of mine (physicist and active Fortran programmer). I realize that this is not what you are asking for, but it may be helpful nevertheless.

books:

When starting, it's best to learn Fortran 95/90 first. For a gentle introduction see http://www.cs.mtu.edu/~shene/COURSES/cs201/NOTES/fortran.html

For an overview of the language see http://en.wikipedia.org/wiki/Fortran_language_features (mostly written by Michael Metcalf; see the book above).

As for OOP, it was possible in Fortran 95 using various hacks, but another revision of the language (Fortran 2003) included OOP features into the language norm itself. For technical account on Fortran 2003 features see ftp://ftp.nag.co.uk/sc22wg5/N1551-N1600/N1579.pdf For tutorial on OOP in Fortran 2003 see http://www.pgroup.com/lit/articles/insider/v3n1a3.htm and http://www.pgroup.com/lit/articles/insider/v3n2a2.htm

Fortran is still evolving, the latest standard being Fortran 2008 which introduced concurrent programming techniques:
http://www.training.prace-ri.eu/uploads/tx_pracetmo/coarrayvideo1.pdf
http://www.training.prace-ri.eu/uploads/tx_pracetmo/coarrayvideo2.pdf
http://www.training.prace-ri.eu/uploads/tx_pracetmo/coarrayvideo3.pdf

I should add that there probably isn't a compiler that supports all the features of the standard (2003).

Source Link
Vít Tuček
  • 8.6k
  • 2
  • 30
  • 61

It is not entirely clear to me what are you looking for and why.

If you want the best performance you are almost surely bound to use compiled language such as Fortran[1], C++ or C. Of course, you can always use almost any "higher level language" such as Python, Ruby or whatnot to glue together routines from libraries written in some "low level language" as C, Fortran, etc. Octave, Matlab and Sage come to mind. NumPy is quite good example of this approach, since almost all of its core functions are written in C (i.e. LAPACK).

If, on the other hand, you want to experiment with algorithms themselves, you can implement them in Haskell or (oca)ML or some other "mathematicians friendly" language. Also, succinct syntax and lack of side effects means it's much easier to prove correctness. Moreover there are area specific systems/languages as LiE, Macaulay2, Singular, GAP, ...

Writing basic routines (such as those from Numerical Recipes) in any other language than C, C++ or Fortran means that

  • you are doing an exercise
  • you are trying to solve a problem in a language where you can't use functions from libraries written in C/C++/Fortran
  • you need numerical routines in a big (i.e. not feasible to rewrite in C/C++/Fortran) project where calling an external library causes unwanted overhead (this can be the case for example with Java).

[1] Please note that modern Fortran is quite high level language with functional and object-oriented features.