System.Single Structure
Represents a 32-bit single-precision floating-point number.

See Also: Single Members

Syntax

[System.Runtime.InteropServices.ComVisible(true)]
public struct Single : IComparable, IComparable<float>, IConvertible, IEquatable<float>, IFormattable

Remarks

float is a 32-bit single precision floating-point type that represents values ranging from approximately 1.5E-45 to 3.4E+38 and from approximately -1.5E-45 to -3.4E+38 with a precision of 7 decimal digits. The float type conforms to standard IEC 60559:1989, Binary Floating-point Arithmetic for Microprocessor Systems.

A float can represent the following values:

When performing binary operations, if one of the operands is a floating-point type (double or float ), then the other operand is required to be an integral type or a floating-point type and the operation is evaluated as follows:

The floating-point operators, including the assignment operators, do not throw exceptions. Instead, in exceptional situations, the result of a floating-point operation is zero, infinity, or NaN, as described below:

Conforming implementations of the CLI are permitted to perform floating-point operations using a precision that is higher than that required by the float type. For example, hardware architectures that support an "extended" or "long double" floating-point type with greater range and precision than the float type could implicitly perform all floating-point operations using this higher precision type. Expressions evaluated using a higher precision might cause a finite result to be produced instead of an infinity.

Thread Safety

All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0