Welcome to our community

Be a part of something great, join today!

Scientific Programming

Barioth

Member
Jan 17, 2013
52
Hi everyone, as an undergrad in Pure math I have to take two classes of C and C++ programing.


I also have to take a mathematica class. I really donMt mind because I love programing and I'll probably get more class like this. But I'm wondering what good is C and C++ when one can use mathematica witch seem to be better at evaluating mathematical and numerical stuff.


What do you think?

Thanks for passing by!
 

ZaidAlyafey

Well-known member
MHB Math Helper
Jan 17, 2013
1,667
Re: Scientific Programing

To me it is very important to study a programming language . Sometimes you need to evaluate things that Mathematica can't or computation time exceeded. If you have your own code then you can adjust it the way you want and improve it as much as you can. For example ,you can easily implement series and evaluate an approximated value.
 

Ackbach

Indicium Physicus
Staff member
Jan 26, 2012
4,197
Re: Scientific Programing

As a note: in some situations, such as massively parallel programming, C and C++ are the only languages used, because they run much faster than Mathematica or anything else. C and C++ are typically the tool of choice on a super-computer. Anything you can do on a computer, you can do in C++. It's not always the best tool, but often it is.
 

Barioth

Member
Jan 17, 2013
52
Re: Scientific Programing

That make a lot of sense!

Thanks!
 

Klaas van Aarsen

MHB Seeker
Staff member
Mar 5, 2012
8,885
Re: Scientific Programing

In the real world it's not all math or mathematica.
A programming language like C/C++ is used a lot however.
 

zzephod

Well-known member
Feb 3, 2013
134
Re: Scientific Programing

In the real world it's not all math or mathematica.
A programming language like C/C++ is used a lot however.
Maybe you should consider Python, it has extensions to give it the numerical power of Matlab (numpy, scipy and matplotlib), and to give it symbolic capability (sympy) while still being a GP scripting language. Also it is free ...

.
 

MarkFL

Administrator
Staff member
Feb 24, 2012
13,775
I may be dating myself (think 2 decades ago), but one thing I liked about C was the ability to embed assembler in the code for bottlenecks. But, this was in the days when memory was at a premium. (Happy)
 

zzephod

Well-known member
Feb 3, 2013
134
I may be dating myself (think 2 decades ago), but one thing I liked about C was the ability to embed assembler in the code for bottlenecks. But, this was in the days when memory was at a premium. (Happy)
Ten years ago we wrote DSP code in plain C, today the default seems to be C++ (when we aren't using domain specific tools) despite the overheads.

.