O'Reilly logo

The C++ Programming Language, Fourth Edition by Bjarne Stroustrup

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

40. 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

Numerical Limits

Limit Macros

Standard Mathematical Functions

complex Numbers

A Numerical Array: valarray

Constructors and Assignments; Subscripting; Operations; Slices; slice_array; Generalized Slices

Generalized Numerical Algorithms

accumulate(); inner_product(); partial_sum() and adjacent_difference(); iota()

Random Numbers

Engines; Random Device; Distributions; C-Style Random Numbers

Advice

40.1. Introduction

C++ was not designed primarily with numeric computation in mind. However, numeric computation typically occurs in the context of other work – such ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required