O'Reilly logo

Exceptional C++ Style 40 New Engineering Puzzles, Programming Problems, and Solutions by Herb Sutter

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

Chapter 30. double or Nothing

Difficulty: 4

No, this Item isn't about gambling. It is, however, about a different kind of “float,” so to speak, and lets you test your skills about basic floating-point operations in C and C++.

Solution

float and double in a Nutshell

  1. What's the difference between float and double?

Quoting from the C++ standard:

 

There are three floating point types: float, double, and long double. The type double provides at least as much ...

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