Do importable libraries exist for common mathematical operations (e.g. min, max and mean) in C or C++? : <p>I'm a Python programmer starting to learn C / C++. One issue I'm finding, however, is that the C languages seem to lack a lot of "basic" mathematical operations. For example, even finding the min, max or mean of an array.</p>

<p>Consider finding the maximum value of an array as an example. I appreciate this is an "easy" task and I can write a simple loop that goes through the whole array and compares each element to the current maximum-found value, replacing this maximum with the current element if it exceeds it. However, it's annoying in each project I'm working on to have to define such commonly used functions.</p>

<p>Therefore, I wonder if there are widely used / accepted C &amp; C++ libraries for such mathematical operations (i.e. similar to numpy for Python), which would save time and limit the chance of me introducing bugs by re-writing commonly used algorithms?</p>

<p>More generally, would this be considered bad practice in C/C++ programs - do such programmers simply expect to see everything coded up from first principles?</p>

<p>Thanks</p>
