Where Can I Find C++ Mathematical #Includes for Common Functions?

  • Context: C/C++ 
  • Thread starter Thread starter davidbenari
  • Start date Start date
  • Tags Tags
    C++ Mathematical
Click For Summary
SUMMARY

This discussion focuses on the availability of mathematical #include files for C++ that provide functions similar to those found in MATLAB or Python libraries like SciPy and NumPy. Users recommend libraries such as Boost and Dlib for various mathematical functions. The standard C99 libraries, specifically and , are also highlighted for their inclusion of trigonometric functions. The conversation emphasizes the need for accessible resources for C++ users transitioning from other programming languages.

PREREQUISITES
  • Basic understanding of C++ programming
  • Familiarity with standard libraries in C++
  • Knowledge of mathematical functions and their applications
  • Awareness of third-party libraries like Boost and Dlib
NEXT STEPS
  • Explore Boost C++ Libraries for advanced mathematical functions
  • Investigate Dlib for machine learning and numerical optimization
  • Learn about the C99 standard libraries and their functions
  • Research additional numerical libraries for C++, such as Eigen or Armadillo
USEFUL FOR

C++ developers, students transitioning from MATLAB or Python, and anyone seeking to enhance their mathematical programming capabilities in C++.

davidbenari
Messages
466
Reaction score
18
I've just begun learning c++ and what is very different from MATLAB (e.g.) is that one has to use include files.

I was wondering if there's somewhere I can download mathematical #includes which already has stuff like matrix inverses, trigonometric functions, etc, defined.

I think numerical recipes has something like that, but you have to pay.

In python one usually uses scipy, numpy and similar stuff. But what do people that use c++ do?
 
Technology news on Phys.org
Trig functions are included in the standard C99 libraries:

Code:
#include <cmath>
#include <cstdio>

int main(int, char**){
     printf("Sin of pi: %f", sin(3.14));
     return 0;
}
 
  • Like
Likes   Reactions: davidbenari

Similar threads

  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
81
Views
8K
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
6K
  • · Replies 17 ·
Replies
17
Views
2K
  • · Replies 17 ·
Replies
17
Views
5K
Replies
5
Views
8K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K