Bagikan melalui


Single.IsNegativeInfinity(Single) Metode

Definisi

Mengembalikan nilai yang menunjukkan apakah angka yang ditentukan mengevaluasi ke tak terbatas negatif.

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

Parameter

f
Single

Angka floating-point presisi tunggal.

Mengembalikan

true jika f mengevaluasi ke NegativeInfinity; jika tidak, false.

Penerapan

Contoh

Contoh kode berikut menunjukkan IsNegativeInfinity metode .

// 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

Keterangan

Operasi floating-point kembali NegativeInfinity untuk memberi sinyal kondisi luapan.

Berlaku untuk

Lihat juga