O'Reilly logo

C++17 Standard Library Quick Reference: A Pocket Guide to Data Structures, Algorithms, and Functions by Marc Gregoire, Peter Van Weert

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

© Peter Van Weert and Marc Gregoire 2019
Peter Van Weert and Marc GregoireC++17 Standard Library Quick Referencehttps://doi.org/10.1007/978-1-4842-4923-9_1

1. Numerics and Math

Peter Van Weert1  and Marc Gregoire2
(1)
Kessel-Lo, Belgium
(2)
Meldert, Belgium
 

Common Mathematical Functions <cmath>

The <cmath> header defines an extensive collection of common math functions in the std namespace. Unless otherwise specified, all functions are overloaded to accept all standard numerical types, with the following rules for determining the return type:
  • If all arguments are float, the return type is float as well. Analogous for double and long  double inputs.

  • If mixed types or integers are passed, these numbers are converted to double, and a double is returned as ...

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