|
Constants 1.0
Constants related to math, environment, unit ocnversion macros.
|
This library provides a collection of commonly used mathematical constants, unit-conversion macros, SI and IEC prefixes, and data-type-related constants.
The library is organized into three main categories:
The constants library provides:
The library is provided through the following headers:
The mathematical constants header provides commonly used values of pi, tau, Euler's number, square roots, and cube roots.
Examples include:
Precomputed multiples and sub-multiples of pi are also available, together with powers of Euler's number and roots from 2 through 25.
The unit conversion header provides macros for commonly used engineering and scientific unit conversions.
Examples:
Examples:
Examples:
Examples:
Examples:
Examples:
Examples:
The library provides SI decimal prefixes ranging from QUETTA through QUECTO.
Examples:
IEC binary prefixes are also provided:
The data type constants header provides minimum and maximum values for integer types together with floating-point range and precision constants.
Examples:
Floating-point constants include:
FLOAT_MIN FLOAT_MAX FLOAT_MIN_POS FLOAT_SMALL FLOAT_BIG FLOAT_EPSILON DOUBLE_MIN DOUBLE_MAX DOUBLE_MIN_POS DOUBLE_SMALL DOUBLE_BIG DOUBLE_EPSILON The complete constants library can be included through the main header:
The library is divided into the following functional groups:
constants_math.h constants_units.h constants_data_type.h constants.h Copyright (c) 2026 Abhinay Kumar