Double.IsNegativeInfinity(Double) Método
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Devuelve un valor que indica si el número especificado se evalúa como infinito negativo.
public:
static bool IsNegativeInfinity(double d);
public:
static bool IsNegativeInfinity(double d) = System::Numerics::INumberBase<double>::IsNegativeInfinity;
public static bool IsNegativeInfinity(double d);
static member IsNegativeInfinity : double -> bool
Public Shared Function IsNegativeInfinity (d As Double) As Boolean
- d
- Double
Número de punto flotante de precisión doble.
Es true
si d
se evalúa en NegativeInfinity; en caso contrario, es false
.
En el ejemplo de código siguiente se muestra el uso de IsNegativeInfinity:
// This will return S"true".
Console::WriteLine( "IsNegativeInfinity(-5.0 / 0) == {0}.", Double::IsNegativeInfinity( -5.0 / zero ) ? (String^)"true" : "false" );
// This will return "true".
Console.WriteLine("IsNegativeInfinity(-5.0 / 0) == {0}.", Double.IsNegativeInfinity(-5.0 / 0) ? "true" : "false");
// This will return "true".
printfn $"IsNegativeInfinity(-5.0 / 0) = {Double.IsNegativeInfinity(-5. / 0.)}."
' This will return "True".
Console.Write("IsNegativeInfinity(-5.0 / 0) = ")
If Double.IsNegativeInfinity(-5 / 0) Then
Console.WriteLine("True.")
Else
Console.WriteLine("False.")
End If
if ( d > Double::MaxValue )
{
Console::WriteLine( "Your number is bigger than a double." );
}
if (d > Double.MaxValue)
Console.WriteLine("Your number is bigger than a double.");
if d > Double.MaxValue then
printfn $"Your number is bigger than a double."
If D > Double.MaxValue Then
Console.WriteLine("Your number is bigger than a double.")
End If
// This will equal Infinity.
Console::WriteLine( "10.0 minus NegativeInfinity equals {0}.", (10.0 - Double::NegativeInfinity) );
// This will equal Infinity.
Console.WriteLine("10.0 minus NegativeInfinity equals {0}.", (10.0 - Double.NegativeInfinity).ToString());
// This will equal Infinity.
printfn $"10.0 minus NegativeInfinity equals {10.0 - Double.NegativeInfinity}."
' This will equal Infinity.
Console.WriteLine("10.0 minus NegativeInfinity equals " + (10 - Double.NegativeInfinity).ToString() + ".")
Las operaciones de punto flotante vuelven NegativeInfinity a indicar una condición de desbordamiento.
Producto | Versiones |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.0, 2.1 |
UWP | 10.0 |
Comentarios de .NET
.NET es un proyecto de código abierto. Seleccione un vínculo para proporcionar comentarios: