次の方法で共有


Double.IsNegativeInfinity(Double) メソッド

定義

指定した数値が負の無限大と評価されるかどうかを示す値を返します。

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

倍精度浮動小数点数。

戻り値

dNegativeInfinity と評価される場合は true。それ以外の場合は false

実装

次のコード例は、 の使用方法 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() + ".")

注釈

浮動小数点演算は、オーバーフロー条件を通知するために戻ります NegativeInfinity

適用対象

こちらもご覧ください