12. Numerics

The purpose of computing is insight, not numbers.

– R. W. Hamming

... but for the student,numbers are often the best road to insight.

– A. Ralston

Introduction

Mathematical Functions

Numerical Algorithms

Complex Numbers

Random Numbers

Vector Arithmetic

Numeric Limits

Advice

12.1. Introduction

C++ was not designed primarily with numeric computation in mind. However, numeric computation typically occurs in the context of other work – such as database access, networking, instrument control, graphics, simulation, and financial analysis – so C++ becomes an attractive vehicle for computations that are part of a larger system. Furthermore, numeric methods have come a long way from being simple loops over vectors of floating-point ...

Get A Tour of C++ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.