Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Single.IsNegativeInfinity(Single) Method
Definition
- Namespace:
- System
- Assemblies:
- mscorlib.dll, System.Runtime.dll
- Assemblies:
- netstandard.dll, System.Runtime.dll
- Assembly:
- System.Runtime.dll
- Assembly:
- mscorlib.dll
- Assembly:
- netstandard.dll
- Source:
- Single.cs
- Source:
- Single.cs
- Source:
- Single.cs
- Source:
- Single.cs
- Source:
- Single.cs
Important
Some information relates to prerelease product that may be substantially modified before itβs released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a value indicating whether the specified number evaluates to negative infinity.
public:
static bool IsNegativeInfinity(float f);
public:
static bool IsNegativeInfinity(float f) = System::Numerics::INumberBase<float>::IsNegativeInfinity;
public static bool IsNegativeInfinity(float f);
static member IsNegativeInfinity : single -> bool
Public Shared Function IsNegativeInfinity (f As Single) As Boolean
Parameters
- f
- Single
A single-precision floating-point number.
Returns
true if f evaluates to NegativeInfinity; otherwise, false.
Implements
Examples
The following code example demonstrates the IsNegativeInfinity method.
// This will return true.
Console.WriteLine("IsNegativeInfinity(-5.0F / 0) == {0}.", Single.IsNegativeInfinity(-5.0F / 0) ? "true" : "false");
// This will return true.
printfn $"IsNegativeInfinity(-5.0F / 0) == {Single.IsNegativeInfinity(-5f / 0f)}."
' This will return True.
Console.Write("IsNegativeInfinity(-5.0 / 0) = ")
If Single.IsNegativeInfinity(-5 / 0) Then
Console.WriteLine("True.")
Else
Console.WriteLine("False.")
End If
Remarks
Floating-point operations return NegativeInfinity to signal an overflow condition.
Applies to
See also
Feedback
Was this page helpful?
