Export (0) Print
Expand All

Double.Epsilon Field

Represents the smallest positive Double value greater than zero. This field is constant.

Namespace: System
Assembly: mscorlib (in mscorlib.dll)

public:
literal double Epsilon
public static final double Epsilon
public const var Epsilon : double

The value of this constant is 4.94065645841247e-324.

Two apparently equivalent floating-point numbers might not compare equal because of differences in their least significant digits. For example, the C# expression, (double)1/3 == (double)0.33333, does not compare equal because the division operation on the left-hand side has maximum precision while the constant on the right-hand side is only precise to the specified digits.

If you create a custom algorithm that determines whether two floating-point numbers can be considered equal, you can use the Epsilon constant to establish the limits of that algorithm.

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft