Double.IsInfinity(Double) Methode
Definition
Gibt einen Wert zurück, der angibt, ob der Wert der angegebenen Zahl -unendlich oder +unendlich ist.Returns a value indicating whether the specified number evaluates to negative or positive infinity.
public:
static bool IsInfinity(double d);
public static bool IsInfinity (double d);
static member IsInfinity : double -> bool
Public Shared Function IsInfinity (d As Double) As Boolean
Parameter
- d
- Double
Eine Gleitkommazahl mit doppelter Genauigkeit.A double-precision floating-point number.
Gibt zurück
true
, wenn d
entweder PositiveInfinity oder NegativeInfinity ergibt, andernfalls false
.true
if d
evaluates to PositiveInfinity or NegativeInfinity; otherwise, false
.
Beispiele
Im folgenden Codebeispiel wird die Verwendung von veranschaulicht IsInfinity :The following code example illustrates the use of IsInfinity:
// This will return S"true".
Console::WriteLine( "IsInfinity(3.0 / 0) == {0}.", Double::IsInfinity( 3.0 / zero ) ? (String^)"true" : "false" );
// This will return "true".
Console.WriteLine("IsInfinity(3.0 / 0) == {0}.", Double.IsInfinity(3.0 / 0) ? "true" : "false");
' This will return "True".
Console.Write("IsInfinity(3.0 / 0) = ")
If Double.IsPositiveInfinity(3 / 0) Then
Console.WriteLine("True.")
Else
Console.WriteLine("False.")
End If
Hinweise
Gleit Komma Operationen geben PositiveInfinity oder zurück NegativeInfinity , um eine Überlauf Bedingung zu signalisieren.Floating-point operations return PositiveInfinity or NegativeInfinity to signal an overflow condition.