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
שתף איתנו פעולה ב- GitHub
ניתן למצוא את המקור לתוכן זה ב- GitHub, שם ניתן גם ליצור ולסקור בעיות ולמשוך בקשות. לקבלת מידע נוסף, עיין במדריך התורמים שלנו.