2 implementations of NaN
System.Private.CoreLib (2)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
813static double IFloatingPointIeee754<double>.NaN => NaN;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
808static float IFloatingPointIeee754<float>.NaN => NaN;
131 references to NaN
System.Numerics.Tensors (65)
System\Numerics\Tensors\netcore\TensorPrimitives.Abs.cs (1)
26/// If a value is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the result stored into the corresponding destination location is the original NaN value with the sign bit removed.
System\Numerics\Tensors\netcore\TensorPrimitives.Add.cs (2)
23/// If either of the element-wise input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the resulting element-wise value is also NaN. 48/// If either of the element-wise input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the resulting element-wise value is also NaN.
System\Numerics\Tensors\netcore\TensorPrimitives.AddMultiply.cs (3)
25/// If any of the element-wise input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the resulting element-wise value is also NaN. 53/// If any of the element-wise input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the resulting element-wise value is also NaN. 81/// If any of the element-wise input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the resulting element-wise value is also NaN.
System\Numerics\Tensors\netcore\TensorPrimitives.Average.cs (1)
14/// If any of the input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the result value is also NaN.
System\Numerics\Tensors\netcore\TensorPrimitives.Cosh.cs (1)
22/// If a value is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the result stored into the corresponding destination location is also NaN.
System\Numerics\Tensors\netcore\TensorPrimitives.CosineSimilarity.cs (1)
23/// If any element in either input tensor is equal to <see cref="IFloatingPointIeee754{TSelf}.NegativeInfinity"/>, <see cref="IFloatingPointIeee754{TSelf}.PositiveInfinity"/>, or <see cref="IFloatingPointIeee754{TSelf}.NaN"/>,
System\Numerics\Tensors\netcore\TensorPrimitives.Distance.cs (1)
27/// If any element in either input tensor is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, NaN is returned.
System\Numerics\Tensors\netcore\TensorPrimitives.Divide.cs (3)
23/// If either of the element-wise input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the resulting element-wise value is also NaN. 49/// If either of the element-wise input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the resulting element-wise value is also NaN. 75/// If either of the element-wise input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the resulting element-wise value is also NaN.
System\Numerics\Tensors\netcore\TensorPrimitives.DivRem.cs (3)
26/// If either of the element-wise input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the resulting element-wise values are also NaN. 48/// If either of the element-wise input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the resulting element-wise values are also NaN. 70/// If either of the element-wise input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the resulting element-wise values are also NaN.
System\Numerics\Tensors\netcore\TensorPrimitives.Dot.cs (1)
24/// If any of the input elements is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the resulting value is also NaN.
System\Numerics\Tensors\netcore\TensorPrimitives.Exp.cs (1)
21/// If a value equals <see cref="IFloatingPointIeee754{TSelf}.NaN"/> or <see cref="IFloatingPointIeee754{TSelf}.PositiveInfinity"/>, the result stored into the corresponding destination location is set to NaN.
System\Numerics\Tensors\netcore\TensorPrimitives.FusedMultiplyAdd.cs (3)
28/// If either of the element-wise input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the resulting element-wise value is also NaN. 63/// If either of the element-wise input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the resulting element-wise value is also NaN. 97/// If either of the element-wise input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the resulting element-wise value is also NaN.
System\Numerics\Tensors\netcore\TensorPrimitives.Lerp.cs (3)
26/// If either of the element-wise input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the resulting element-wise value is also NaN. 54/// If either of the element-wise input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the resulting element-wise value is also NaN. 82/// If either of the element-wise input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the resulting element-wise value is also NaN.
System\Numerics\Tensors\netcore\TensorPrimitives.Log.cs (1)
22/// If a value is negative or equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the result stored into the corresponding destination location is set to NaN.
System\Numerics\Tensors\netcore\TensorPrimitives.Log10.cs (1)
21/// If a value is negative or equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the result stored into the corresponding destination location is set to NaN.
System\Numerics\Tensors\netcore\TensorPrimitives.Log10P1.cs (1)
21/// If a value is negative or equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the result stored into the corresponding destination location is set to NaN.
System\Numerics\Tensors\netcore\TensorPrimitives.Log2.cs (1)
22/// If a value is negative or equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the result stored into the corresponding destination location is set to NaN.
System\Numerics\Tensors\netcore\TensorPrimitives.Log2P1.cs (1)
21/// If a value is negative or equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the result stored into the corresponding destination location is set to NaN.
System\Numerics\Tensors\netcore\TensorPrimitives.LogP1.cs (1)
21/// If a value is negative or equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the result stored into the corresponding destination location is set to NaN.
System\Numerics\Tensors\netcore\TensorPrimitives.Max.cs (3)
18/// The determination of the maximum element matches the IEEE 754:2019 `maximum` function. If any value equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/> 50/// The determination of the maximum element matches the IEEE 754:2019 `maximum` function. If either value is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, 80/// The determination of the maximum element matches the IEEE 754:2019 `maximum` function. If either value is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>,
System\Numerics\Tensors\netcore\TensorPrimitives.MaxMagnitude.cs (1)
17/// The determination of the maximum magnitude matches the IEEE 754:2019 `maximumMagnitude` function. If any value equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>
System\Numerics\Tensors\netcore\TensorPrimitives.MaxNumber.cs (2)
48/// The determination of the maximum element matches the IEEE 754:2019 `maximumNumber` function. If either value is <see cref="IFloatingPointIeee754{TSelf}.NaN"/> 78/// The determination of the maximum element matches the IEEE 754:2019 `maximumNumber` function. If either value is <see cref="IFloatingPointIeee754{TSelf}.NaN"/>
System\Numerics\Tensors\netcore\TensorPrimitives.Min.cs (3)
17/// The determination of the minimum element matches the IEEE 754:2019 `minimum` function. If any value is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/> 49/// The determination of the maximum element matches the IEEE 754:2019 `maximum` function. If either value is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, 79/// The determination of the maximum element matches the IEEE 754:2019 `maximum` function. If either value is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>,
System\Numerics\Tensors\netcore\TensorPrimitives.MinMagnitude.cs (3)
17/// The determination of the minimum magnitude matches the IEEE 754:2019 `minimumMagnitude` function. If any value equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/> 48/// The determination of the maximum magnitude matches the IEEE 754:2019 `minimumMagnitude` function. If either value is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, 77/// The determination of the maximum magnitude matches the IEEE 754:2019 `minimumMagnitude` function. If either value is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>,
System\Numerics\Tensors\netcore\TensorPrimitives.MinNumber.cs (2)
48/// The determination of the minimum element matches the IEEE 754:2019 `minimumNumber` function. If either value is <see cref="IFloatingPointIeee754{TSelf}.NaN"/> 78/// The determination of the minimum element matches the IEEE 754:2019 `minimumNumber` function. If either value is <see cref="IFloatingPointIeee754{TSelf}.NaN"/>
System\Numerics\Tensors\netcore\TensorPrimitives.Multiply.cs (2)
23/// If either of the element-wise input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the resulting element-wise value is also NaN. 49/// If either of the element-wise input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the resulting element-wise value is also NaN.
System\Numerics\Tensors\netcore\TensorPrimitives.MultiplyAdd.cs (3)
25/// If either of the element-wise input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the resulting element-wise value is also NaN. 54/// If either of the element-wise input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the resulting element-wise value is also NaN. 82/// If either of the element-wise input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the resulting element-wise value is also NaN.
System\Numerics\Tensors\netcore\TensorPrimitives.MultiplyAddEstimate.cs (3)
28/// If either of the element-wise input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the resulting element-wise value is also NaN. 61/// If either of the element-wise input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the resulting element-wise value is also NaN. 93/// If either of the element-wise input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the resulting element-wise value is also NaN.
System\Numerics\Tensors\netcore\TensorPrimitives.Negate.cs (1)
20/// If any of the element-wise input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the resulting element-wise value is also NaN.
System\Numerics\Tensors\netcore\TensorPrimitives.Norm.cs (1)
18/// If any of the input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the result value is also NaN.
System\Numerics\Tensors\netcore\TensorPrimitives.Product.cs (1)
14/// If any of the input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the result value is also NaN.
System\Numerics\Tensors\netcore\TensorPrimitives.Remainder.cs (3)
23/// If either of the element-wise input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the resulting element-wise values are also NaN. 49/// If either of the element-wise input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the resulting element-wise values are also NaN. 75/// If either of the element-wise input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the resulting element-wise values are also NaN.
System\Numerics\Tensors\netcore\TensorPrimitives.Sinh.cs (1)
21/// If a value is equal to <see cref="IFloatingPointIeee754{TSelf}.NegativeInfinity"/>, <see cref="IFloatingPointIeee754{TSelf}.PositiveInfinity"/>, or <see cref="IFloatingPointIeee754{TSelf}.NaN"/>,
System\Numerics\Tensors\netcore\TensorPrimitives.StdDev.cs (1)
16/// If any of the input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the result value is also NaN.
System\Numerics\Tensors\netcore\TensorPrimitives.Subtract.cs (3)
23/// If either of the element-wise input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the resulting element-wise value is also NaN. 48/// If either of the element-wise input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the resulting element-wise value is also NaN. 73/// If either of the element-wise input values is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the resulting element-wise value is also NaN.
System\Numerics\Tensors\netcore\TensorPrimitives.Sum.cs (1)
15/// If any of the values in the input is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the result is also NaN.
System\Numerics\Tensors\netcore\TensorPrimitives.Tanh.cs (1)
22/// If a value is equal to <see cref="IFloatingPointIeee754{TSelf}.NaN"/>, the corresponding destination location is set to NaN.
System.Private.CoreLib (13)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
812/// <inheritdoc cref="IFloatingPointIeee754{TSelf}.NaN" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.DecimalIeee754.cs (2)
3723return isNegative ? -TFloat.NaN : TFloat.NaN;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.Parsing.cs (3)
1643result = TFloat.NaN; 1661result = TFloat.NaN; 1679result = TFloat.NaN;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Vector.cs (1)
68get => Create(T.NaN);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128.cs (2)
94/// <summary>Gets a new vector with all elements initialized to <see cref="IFloatingPointIeee754{TSelf}.NaN" />.</summary> 99get => Create(T.NaN);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector256.cs (1)
97get => Create(T.NaN);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector512.cs (1)
97get => Create(T.NaN);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector64.cs (1)
70get => Create(T.NaN);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
807/// <inheritdoc cref="IFloatingPointIeee754{TSelf}.NaN" />
System.Private.Windows.Core.TestUtilities (1)
XUnit\TestData.cs (1)
47T.NaN,
System.Runtime.InteropServices (4)
System\Runtime\InteropServices\Marshalling\ExceptionAsNaNMarshaller.cs (4)
9/// Converts all exceptions to <see cref="IFloatingPointIeee754{T}.NaN"/>. 17/// Convert the exception to <see cref="IFloatingPointIeee754{T}.NaN"/>. 20/// <returns><see cref="IFloatingPointIeee754{T}.NaN"/>.</returns> 26return T.NaN;
System.Runtime.Numerics (47)
System\Numerics\Complex.Generic.cs (47)
29public static Complex<T> NaN => new(T.NaN, T.NaN); 478return (imaginary == T.Zero) ? new Complex<T>(real, imaginary) : new Complex<T>(T.NaN, T.NaN); 491return new Complex<T>(real, T.NaN); 502return (real == T.Zero) ? new Complex<T>(real, T.NaN) : new Complex<T>(T.NaN, T.NaN); 557T.IsNaN(absB) ? T.NaN : T.Zero; 563return new Complex<T>(T.NaN, b); 566re = T.IsInfinity(absB) ? T.PositiveInfinity : T.NaN; 567im = T.NaN; 572re = T.IsInfinity(absB) ? T.PositiveInfinity : T.NaN; 573im = T.IsInfinity(absB) ? T.Pi / T.CreateChecked(2) : T.NaN; 607return (imaginary == T.Zero) ? new Complex<T>(T.NaN, imaginary) : new Complex<T>(T.NaN, T.NaN); 621return new Complex<T>(T.PositiveInfinity, T.NaN); 632return (real == T.Zero) ? new Complex<T>(T.NaN, T.CopySign(T.Zero, real)) : new Complex<T>(T.NaN, T.NaN); 683re = T.IsInfinity(absY) ? T.Pi * T.CreateChecked(0.75) : T.IsNaN(absY) ? T.NaN : T.Pi; 688re = T.IsInfinity(absY) ? T.Pi / T.CreateChecked(4) : T.IsNaN(absY) ? T.NaN : T.Zero; 695re = T.NaN; 696im = T.IsInfinity(absY) ? T.NegativeInfinity : T.NaN; 709re = (x == T.Zero) ? T.Pi / T.CreateChecked(2) : T.NaN; 710im = T.NaN; 768return (imaginary == T.Zero) ? new Complex<T>(real, imaginary) : new Complex<T>(T.NaN, T.NaN); 786return (real == T.Zero) ? new Complex<T>(real, T.NaN) : new Complex<T>(T.NaN, T.NaN); 819im = T.IsNaN(absB) ? T.NaN : T.Pi / T.CreateChecked(2); 824re = T.IsInfinity(absB) ? T.Zero : T.NaN; 825im = T.IsInfinity(absB) ? T.Pi / T.CreateChecked(2) : T.NaN; 838re = (a == T.Zero) ? a : T.NaN; 839im = T.NaN; 985return new Complex<T>(T.PositiveInfinity, T.NaN); 993return (imaginary == T.Zero) ? new Complex<T>(T.NaN, imaginary) : new Complex<T>(T.NaN, T.NaN); 1022return new Complex<T>(T.NaN, T.PositiveInfinity); 1029return new Complex<T>(T.PositiveInfinity, T.IsNaN(imaginary) ? T.NaN : T.CopySign(T.Zero, imaginary)); 1035return new Complex<T>(T.NaN, T.NaN); 1787result = (TOther)(object)((value.m_imaginary != T.Zero) ? T.NaN : value.m_real); 1813if (!T.TryConvertToChecked(T.NaN, out result))
System.Text.Json (1)
System\Text\Json\Serialization\Converters\Value\Ieee754FloatingPointConverter.cs (1)
238value = T.NaN;