sincerely Singaporean

If you have not done so, read this full tutorial on how to use SGEXTN to build an application.

SGLFloatLimits

see header file

see source file

class SGLFloatLimits;

part of SGEXTN module SG_Math

static function class providing floating point limits

detailed description

list of all including inherited members

implementation details

preprocessor file inclusion directive: #include ‹SGLFloatLimits.h›

CMake target for BuildLah: SGEXTN::SG_Math

see this link for more information about BuildLah

parent class: (none)

children classes: (none)

static member functions

static float denormalisedMaximumNegative();

static float denormalisedMinimumPositive();

static bool isInfinite(float x);

static bool isNotANumber(float x);

static float maximumFinite();

static float maximumNegative();

static float mimimumFinite();

static float minimumPositive();

static float negativeInfinity();

static float notANumber();

static float positiveInfinity();

static float relativeIncrementGap();

Detailed Description

SGLFloatLimits provides floating point numbers for limits of what the standard can represent, such as the largest possible float and the smallest nonzero float.

Implementation Details

Uses ‹numeric_limits› from Standard Template Library

static float denormalisedMaximumNegative();

Returns maximum negative floating point number that can be represented.

This includes denormalised floating point numbers which do not have full precision.

static float denormalisedMinimumPositive();

Returns minimum positive floating point number that can be represented.

This includes denormalised floating point numbers which do not have full precision.

static bool isInfinite(float x);

Returns if x is positive infinity or negative infinity.

static bool isNotANumber(float x);

Returns if x is a NaN.

static float maximumFinite();

Returns maximum finite floating point number.

static float maximumNegative();

Returns maximum negative floating point number with full precision.

static float mimimumFinite();

Returns minimum finite floating point number, this is negative.

static float minimumPositive();

Returns minimum positive floating point number with full precision.

static float negativeInfinity();

Returns negative infinity.

static float notANumber();

Returns a NaN.

static float positiveInfinity();

Returns positive infinity.

static float relativeIncrementGap();

Returns the difference between 1 and the next floating point number that can be represented.

This provides the percentage error in floating point precision.

©2025 05524F.sg (Singapore)

contact 05524F / report a bug / make a suggestion

about 05524F SINGAPORE values

list of 05524F projects