PDA

View Full Version : Resolved Which language for Math operations


abokhadiga
10-10-2009, 08:39 PM
I have a PhD in animal breeding and genetics.
Actually, most of my used program were written in FORTRAN, but really I have no idea in programming. Now, I'd like to start learning a programming language that would help in doing complex mathematical operations.
Would you suggest a suitable language.

cs_student
10-10-2009, 09:25 PM
If speed is not a major issue then have a look at MATLAB (http://en.wikipedia.org/wiki/Matlab) and GNU Octave (http://www.gnu.org/software/octave/).

If you are going to do high intensity calculations where efficiency will be a major factor I would go with C (http://en.wikipedia.org/wiki/C_(programming_language)) or C++ (http://en.wikipedia.org/wiki/C%2B%2B).

You can also check the sourceforge repository for scientific/engineering (http://sourceforge.net/search/?words=trove%3A%2897+825+817+134+98+776+385+727+736+386+387+246+252+384+135+133+568+600+609+567+272+ 266+741+602+826+383+777+732+591+802+742%29&sort=score&sortdir=desc&offset=0&type_of_search=soft&pmode=0) projects that are similar to yours and see what programming languages they use.



cs_student

oesxyl
10-10-2009, 09:27 PM
I have a PhD in animal breeding and genetics.
Actually, most of my used program were written in FORTRAN, but really I have no idea in programming. Now, I'd like to start learning a programming language that would help in doing complex mathematical operations.
Would you suggest a suitable language.
depend of what you have in mind. Haskel, prolog. erlang, clips, lisp, are few :)
What field of math do you have in mind?.

best regards

abokhadiga
10-11-2009, 06:12 PM
[QUOTE=cs_student;875145]If speed is not a major issue then have a look at MATLAB (http://en.wikipedia.org/wiki/Matlab) and GNU Octave (http://www.gnu.org/software/octave/).

Speed is a major issue !

If you are going to do high intensity calculations where efficiency will be a major factor I would go with C (http://en.wikipedia.org/wiki/C_(programming_language)) or C++ (http://en.wikipedia.org/wiki/C%2B%2B).

Is C# suitable?

abokhadiga
10-11-2009, 06:19 PM
What field of math do you have in mind?

Matrix notation with some hundred thousands of equations.
Most of these problems are solved in FORTRAN programs as report in the first message.

BrickInTheWall
10-11-2009, 06:56 PM
[QUOTE=cs_student;875145]If speed is not a major issue then have a look at MATLAB (http://en.wikipedia.org/wiki/Matlab) and GNU Octave (http://www.gnu.org/software/octave/).

Speed is a major issue !

If you are going to do high intensity calculations where efficiency will be a major factor I would go with C (http://en.wikipedia.org/wiki/C_(programming_language)) or C++ (http://en.wikipedia.org/wiki/C%2B%2B).

Is C# suitable?

C/C++ or assembly is what I would suggest. I use those for programming microcontrollers. There are a lot of solutions out there for programming efficient mathematical functions (i.e. cos, sin, hyperbolic functions etc.).
C# is one of my favorite languages nowadays, fully object oriented and really if you are writing programs for desktops then it doesn't matter. Object oriented languages and microprocessors don't fit together very well yet.

oesxyl
10-11-2009, 07:56 PM
Matrix notation with some hundred thousands of equations.
Most of these problems are solved in FORTRAN programs as report in the first message.
then probably haskel is what you need.

http://en.wikipedia.org/wiki/Haskell_(programming_language)

best regards

Trinithis
10-12-2009, 08:07 AM
I would suggest Haskell too. Just remember to put in the -O2 flag while compiling the code to optimize it. Also perhaps look at this if you are going to do a lot of floating point math: http://www.haskell.org/haskellwiki/Performance/Floating_point