Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Double.Epsilon Field

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

[Visual Basic]
Public Const Epsilon As Double
[C#]
public const double Epsilon;
[C++]
public: const double Epsilon;
[JScript]
public var Epsilon : double;

Remarks

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 visible digits.

Instead, determine if the two sides of a comparison are close enough to equal for your purposes by comparing whether the absolute value of the difference between the left and right-hand sides is less than Epsilon.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

Double Structure | Double Members | System Namespace | Parse

Show:
© 2017 Microsoft