Scientific Programming: C, C++ & Mathematica Explored

In summary: 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.
  • #1
Barioth
49
0
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!
 
Technology news on Phys.org
  • #2
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.
 
  • #3
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.
 
  • #4
Re: Scientific Programing

That make a lot of sense!

Thanks!
 
  • #5
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.
 
  • #6
Re: Scientific Programing

I like Serena said:
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 ...

.
 
  • #7
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)
 
  • #8
MarkFL said:
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.

.
 

FAQ: Scientific Programming: C, C++ & Mathematica Explored

What is Scientific Programming?

Scientific Programming is the use of computer programming languages, such as C, C++, and Mathematica, to solve complex scientific problems and perform data analysis. It involves writing code to manipulate and analyze large data sets and create simulations and mathematical models.

Why is C, C++, and Mathematica commonly used in Scientific Programming?

C, C++, and Mathematica are commonly used in Scientific Programming due to their high performance and efficiency in handling complex mathematical calculations. They also have a wide range of libraries and tools specifically designed for scientific applications, making them ideal for this type of programming.

What are the advantages of using Scientific Programming?

Some advantages of using Scientific Programming include faster and more accurate data analysis, the ability to handle large data sets, and the ability to create simulations and models for complex scientific problems. It also allows for the automation of repetitive tasks, saving time and effort.

What are some common applications of Scientific Programming?

Scientific Programming has a wide range of applications, including data analysis and visualization, statistical analysis, computational physics, bioinformatics, and weather forecasting. It is also commonly used in fields such as engineering, economics, and social sciences.

What skills are required for Scientific Programming?

To be successful in Scientific Programming, one should have a strong understanding of programming fundamentals, as well as advanced knowledge of mathematics and algorithms. Familiarity with specific programming languages, such as C, C++, and Mathematica, is also necessary. Attention to detail and problem-solving skills are also important for effectively analyzing and solving complex scientific problems.

Similar threads

Replies
9
Views
2K
Replies
31
Views
2K
Replies
17
Views
4K
Replies
21
Views
4K
Back
Top