Single.IsNegativeInfinity(Single) Method
Definition
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 / zero ) ? (String^)"true" : "false" );
// 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
Met ons samenwerken op GitHub
De bron voor deze inhoud vindt u op GitHub, waar u ook problemen en pull-aanvragen kunt maken en controleren. Bekijk onze gids voor inzenders voor meer informatie.