
++ has about 10 distinct integral datatypes and three more floating point datatypes. Each datatype has different numeric properties such as the numeric range, the maximum number of digits it can represent, and a different precision. These properties are critical in financial, scientific, graphical, and DSP applications. This article will discuss how to obtain the numeric properties of fundamental datatypes programmatically by using the
<limits> library.

"How many digits can a double store?", "What is the maximum positive value that signed long can represent?", and similar questions are critical to the design of your application. How do you get the answers to these questions in a systematic and portable fashion?

Use the standard <limits> library to obtain the numeric properties of built-in datatypes.