426 references to NaN
BinaryFormatTests (3)
FormatTests\FormattedObject\BinaryFormatWriterTests.cs (1)
223new float[] { 1.0f, float.NaN, float.PositiveInfinity },
FormatTests\FormattedObject\ListTests.cs (1)
93new List<float>() { float.NaN, float.PositiveInfinity, float.NegativeInfinity, float.NegativeZero },
FormatTests\FormattedObject\PrimitiveTypeTests.cs (1)
74{ (byte)PrimitiveType.Single, float.NaN },
ConfigurationSchemaGenerator (1)
RuntimeSource\SourceGenerators\CSharpSyntaxUtilities.cs (1)
43case float.NaN:
Microsoft.AspNetCore.App.Analyzers (1)
src\Shared\RoslynUtils\SymbolExtensions.cs (1)
193float f when f is float.NaN => "float.NaN",
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (1)
UnaryServerCallHandlerTests.cs (1)
1243[InlineData(@"""NaN""", float.NaN)]
Microsoft.AspNetCore.Http.Extensions.Tests (1)
RequestDelegateGenerator\RequestDelegateCreationTests.SpecialTypes.cs (1)
183new object[] { "float", "float.NaN", float.NaN, true },
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
src\Shared\RoslynUtils\SymbolExtensions.cs (1)
193float f when f is float.NaN => "float.NaN",
Microsoft.AspNetCore.Http.ValidationsGenerator (1)
src\Shared\RoslynUtils\SymbolExtensions.cs (1)
193float f when f is float.NaN => "float.NaN",
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (2)
83{ float.NaN, nameof(float.NaN) },
Microsoft.CodeAnalysis.CSharp (2)
Binder\PatternExplainer.cs (1)
740float.NaN => "float.NaN",
Utilities\ValueSetFactory.SingleTC.cs (1)
22float FloatingTC<float>.NaN => float.NaN;
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Semantics\PatternSwitchTests.cs (1)
1367Diagnostic(ErrorCode.ERR_DuplicateCaseLabel, "case -float.NaN:").WithArguments((-float.NaN).ToString()).WithLocation(68, 13),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (5)
Semantics\NullableConversionTests.cs (2)
769Diagnostic(ErrorCode.ERR_ConstOutOfRangeChecked, "(int?)float.NaN").WithArguments(float.NaN.ToString(), "int").WithLocation(23, 13), 793Diagnostic(ErrorCode.ERR_ConstOutOfRangeChecked, "(int)float.NaN").WithArguments(float.NaN.ToString(), "int").WithLocation(37, 13),
Utilities\ValueSetTests.cs (3)
345Assert.Equal("NaN", ForFloat.Related(Equal, float.NaN).ToString()); 347Assert.True(ForFloat.Related(Equal, float.NaN).Any(Equal, float.NaN));
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
CodeGeneration\SyntaxGeneratorTests.cs (1)
89VerifySyntax<MemberAccessExpressionSyntax>(Generator.LiteralExpression(float.NaN), "global::System.Single.NaN");
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (1)
CodeGeneration\SyntaxGeneratorTests.vb (1)
85VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.LiteralExpression(Single.NaN), "Global.System.Single.NaN")
Microsoft.CodeAnalysis.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (2)
83{ float.NaN, nameof(float.NaN) },
Microsoft.Data.Analysis (1)
PrimitiveDataFrameColumn.cs (1)
886(ref float value) => value = column[cursor.Position] ?? float.NaN;
Microsoft.Data.Analysis.Tests (1)
DataFrameIDataViewTests.cs (1)
164Assert.Equal(float.NaN, preview.ColumnView[3].Values[5]); // null row
Microsoft.DotNet.XUnitAssert.Tests (6)
EqualityAssertsTests.cs (6)
2255 Assert.Equal(float.NaN, float.NaN, 1000.0f); 2265 var ex = Record.Exception(() => Assert.Equal(20210102.2208f, float.NaN, 20000000.0f)); 4221 var ex = Record.Exception(() => Assert.NotEqual(float.NaN, float.NaN, 1000.0f)); 4235 Assert.NotEqual(20210102.2208f, float.NaN, 20000000.0f);
Microsoft.Maui (6)
Layouts\Flex.cs (6)
266 public float Bottom { get; set; } = float.NaN; 281 public float Height { get; set; } = float.NaN; 293 public float Left { get; set; } = float.NaN; 354 public float Right { get; set; } = float.NaN; 364 public float Top { get; set; } = float.NaN; 369 public float Width { get; set; } = float.NaN;
Microsoft.Maui.Controls (6)
Layout\FlexLayout.cs (2)
449 item.Width = width < 0 ? float.NaN : (float)width; 451 item.Height = height < 0 ? float.NaN : (float)height;
LegacyLayouts\FlexLayout.cs (4)
337 item.Width = width < 0 ? float.NaN : (float)width; 339 item.Height = height < 0 ? float.NaN : (float)height; 368 item.Width = ((View)sender).WidthRequest < 0 ? float.NaN : (float)((View)sender).WidthRequest; 369 item.Height = ((View)sender).HeightRequest < 0 ? float.NaN : (float)((View)sender).HeightRequest;
Microsoft.ML.AutoML.Tests (2)
DatasetDimensionsTests.cs (2)
47dataBuilder.AddColumn("Nan", NumberDataViewType.Single, new float[] { 0, 1, 0, 1, float.NaN }); 76new float[] { 1, float.NaN },
Microsoft.ML.Core (6)
Utilities\DoubleParser.cs (4)
118value = Single.NaN; 137value = Single.NaN; 500value = Single.NaN; 507value = Single.NaN;
Utilities\MathUtils.cs (2)
709return float.NaN; 721return float.NaN;
Microsoft.ML.Core.Tests (4)
UnitTests\DataTypes.cs (2)
34float fVal = float.NaN; 44Assert.Equal(float.NaN, fVal);
UnitTests\TestUtilities.cs (2)
74x[0] = float.NaN; 108x[0] = float.NaN;
Microsoft.ML.CpuMath (2)
AlignedArray.cs (2)
72Items[i] = float.NaN; 74Items[i] = float.NaN;
Microsoft.ML.Data (21)
Data\Conversion.cs (3)
802private void GetNA(ref R4 value) => value = R4.NaN; 1380dst = R4.NaN; 1688value = R4.NaN;
Data\RowCursorUtils.cs (2)
409dst = Single.NaN; 443editor.Values[kv.Key] = Single.NaN;
DataLoadSave\Database\DatabaseLoaderCursor.cs (3)
346return (ref float value) => value = DataReader.IsDBNull(columnIndex) ? float.NaN : DataReader.GetFloat(columnIndex); 629editor.Values[i] = DataReader.IsDBNull(columnIndex) ? float.NaN : DataReader.GetFloat(columnIndex); 635editor.Values[i++] = DataReader.IsDBNull(columnIndex) ? float.NaN : DataReader.GetFloat(columnIndex);
EntryPoints\EntryPointNode.cs (4)
469string stageId = "", float cost = float.NaN, string label = null, string group = null, string weight = null, 563float cost = float.NaN) 597float cost = float.NaN) 913var cost = node[FieldNames.Cost] == null ? float.NaN : node[FieldNames.Cost].Value<float>();
Evaluators\AnomalyDetectionEvaluator.cs (1)
256thresholdAtK = thresholdAtP = thresholdAtNumPos = Single.NaN;
Evaluators\BinaryClassifierEvaluator.cs (2)
638_probGetter = (ref Single value) => value = Single.NaN; 1161ValueGetter<Single> nanGetter = (ref Single value) => value = Single.NaN;
Evaluators\ClusteringEvaluator.cs (1)
508_labelGetter = (ref Single value) => value = Single.NaN;
Evaluators\MulticlassClassificationEvaluator.cs (1)
725(ref float dst) => dst = float.NaN;
Evaluators\QuantileRegressionEvaluator.cs (1)
392ValueGetter<float> nanGetter = (ref float value) => value = Single.NaN;
Evaluators\RankingEvaluator.cs (2)
446_currentQueryWeight = Single.NaN; 520_currentQueryWeight = Single.NaN;
Evaluators\RegressionEvaluator.cs (1)
280ValueGetter<float> nan = (ref float value) => value = Single.NaN;
Microsoft.ML.Ensemble (1)
OutputCombiners\BaseMultiCombiner.cs (1)
103editor.Values[i] = Single.NaN;
Microsoft.ML.Fairlearn (8)
Reductions\UtilityParity.cs (8)
33public UtilityParity(float differenceBound = Single.NaN, float ratioBond = Single.NaN, float ratioBoundSlack = 0.0f) 35if (Single.NaN.Equals(differenceBound) && Single.NaN.Equals(ratioBond)) 40else if (!Single.NaN.Equals(differenceBound) && Single.NaN.Equals(ratioBond)) 45else if (Single.NaN.Equals(differenceBound) && !Single.NaN.Equals(ratioBond))
Microsoft.ML.FastTree (3)
RandomForestRegression.cs (1)
77return float.NaN;
TreeEnsembleFeaturizer.cs (2)
761dst = Single.NaN; 781dst = Single.NaN;
Microsoft.ML.Mkl.Components (1)
OlsLinearRegression.cs (1)
771Double[] standardErrors = null, Double[] tValues = null, Double[] pValues = null, Double rSquared = 1, Double rSquaredAdjusted = float.NaN)
Microsoft.ML.Parquet (1)
ParquetLoader.cs (1)
705public void Conv(in float? src, ref Single dst) => dst = src ?? Single.NaN;
Microsoft.ML.Recommender (1)
MatrixFactorizationPredictor.cs (1)
277dst = float.NaN;
Microsoft.ML.ResultProcessor (1)
ResultProcessor.cs (1)
947perFoldMetrics[metricValues.Key] = new ResultMetric(float.NaN)
Microsoft.ML.Samples (18)
Dynamic\DataOperations\FilterRowsByMissingValues.cs (3)
22new DataPoint(){ Feature1 = 21, Feature2 = new [] { 1, 2, float.NaN} 26new DataPoint(){ Feature1 = float.NaN, Feature2 = new [] { 1, 2, 27float.NaN} }
Dynamic\Transforms\FeatureSelection\SelectFeaturesBasedOnCount.cs (2)
87NumericVector = new float[] { 4, float.NaN, 6 }, 102NumericVector = new float[] { 4, 0, float.NaN },
Dynamic\Transforms\FeatureSelection\SelectFeaturesBasedOnCountMultiColumn.cs (3)
87NumericVector = new float[] { 4, float.NaN, 6 }, 102NumericVector = new float[] { 4, float.NaN, float.NaN },
Dynamic\Transforms\IndicateMissingValues.cs (2)
21new DataPoint(){ Features = new float[3] {0, float.NaN, 1} }, 22new DataPoint(){ Features = new float[3] {-1, float.NaN, -3} },
Dynamic\Transforms\IndicateMissingValuesMultiColumn.cs (3)
22new DataPoint(){ Features1 = new float[3] {0, float.NaN, 1}, 23Features2 = new float[2] {float.NaN, 1} }, 25new DataPoint(){ Features1 = new float[3] {-1, float.NaN, -3},
Dynamic\Transforms\ReplaceMissingValues.cs (2)
24new DataPoint(){ Features = new float[3] {0, float.NaN, 1} }, 26new DataPoint(){ Features = new float[3] {-1, float.NaN, -3} },
Dynamic\Transforms\ReplaceMissingValuesMultiColumn.cs (3)
23new DataPoint(){ Features1 = new float[3] {0, float.NaN, 1}, 26new DataPoint(){ Features1 = new float[3] {-1, float.NaN, -3}, 27Features2 = new float[2] {-1, float.NaN} },
Microsoft.ML.SamplesUtils (1)
SamplesDatasetUtils.cs (1)
318float value = float.NaN;
Microsoft.ML.StandardTrainers (2)
Optimizer\LineSearch.cs (1)
292_step = Value = float.NaN;
Standard\Simple\SimpleTrainers.cs (1)
292float prob = prob = pos + neg > 0 ? (float)(pos / (pos + neg)) : float.NaN;
Microsoft.ML.TestFramework (1)
DataPipe\TestDataPipe.cs (1)
23private static float[] _dataFloat = new float[] { -0.0f, 0, 1, -1, 2, -2, Single.NaN, Single.MinValue,
Microsoft.ML.Tests (35)
ExpressionLanguageTests\ExpressionLanguageTests.cs (1)
538return R4.NaN;
OnnxConversionTest.cs (2)
1157new DataPoint() { Features = new float[3] {0, float.NaN, 1}, }, 1158new DataPoint() { Features = new float[3] {-1, float.NaN, float.PositiveInfinity}, },
TextLoaderTests.cs (7)
1021Assert.Equal(Single.NaN, feature); 1100Assert.NotEqual(Single.NaN, featuresPeriodArray[i]); 1107Assert.Equal(Single.NaN, featuresPeriodArray[i]); 1112Assert.Equal(Single.NaN, featuresPeriodArray[i]); 1113Assert.NotEqual(Single.NaN, featuresCommaArray[i]); 1118Assert.NotEqual(Single.NaN, featuresPeriodArray[i]); 1119Assert.Equal(Single.NaN, featuresCommaArray[i]);
TrainerEstimators\TreeEnsembleFeaturizerTest.cs (1)
796rowWithFloat.FloatLabel = rowWithKey.KeyLabel == 0 ? float.NaN : rowWithKey.KeyLabel - 1;
Transformers\ConvertTests.cs (2)
205ConvA = new float[] { float.NaN, float.NaN },
Transformers\HashTests.cs (2)
305HashTestCore(float.NaN, NumberDataViewType.Single, 0, 0, 0, 0, 0); 379new TestClass() { A = float.NaN, B = 3, C = 12 }
Transformers\NAIndicatorTests.cs (9)
40new TestClass() { A = float.NaN, B = double.NaN, C = new float[2]{ float.NaN, float.NaN } , D = new double[2]{ double.NaN,double.NaN}}, 68new TestClass() { A = float.NaN, B = double.NaN, C = new float[2]{ float.NaN, float.NaN } , D = new double[2]{ double.NaN,double.NaN}}, 131new TestClass() { A = float.NaN, B = double.NaN, C = new float[2]{ float.NaN, float.NaN } , D = new double[2]{ double.NaN,double.NaN}},
Transformers\NAReplaceTests.cs (11)
60new TestClass { A = 2f, B = 2d, C = new float[] { float.NaN, 9f }, D = new double[] { double.NaN, 9f } }, 61new TestClass { A = float.NaN, B = double.NaN, C = new float[] { 2f, float.NaN }, D = new double[] { 2f, double.NaN } }, 63new TestClass{ A = float.NaN, B = double.NaN, C = new float[] { 1f, float.NaN }, D = new double[] { 1f, double.NaN } }, 105new TestClass() { A = float.NaN, B = double.NaN, C= new float[2]{ float.NaN, float.NaN } , D = new double[2]{ double.NaN,double.NaN}}, 163new TestClass() { A = float.NaN, B = double.NaN, C= new float[2]{ float.NaN, float.NaN } , D = new double[2]{ double.NaN,double.NaN}},
Microsoft.ML.TimeSeries (9)
AdaptiveSingularSpectrumSequenceModeler.cs (1)
192public Single LastValue { get { return _buffer.Count > 0 ? _buffer[_buffer.Count - 1] : Single.NaN; } }
ExponentialAverageTransform.cs (1)
114output = Single.NaN;
MovingAverageTransform.cs (5)
142return nb == 0 ? Single.NaN : sumValues / nb; 170return sumWeights != 0 ? sumValues / sumWeights : Single.NaN; 234return nb == 0 ? Single.NaN : currentSum / nb; 240return nb == 0 ? Single.NaN : currentSum / nb; 266output = Single.NaN;
PValueTransform.cs (1)
117dst = Single.NaN;
SequentialForecastingTransformBase.cs (1)
301editor.Values[i] = float.NaN;
Microsoft.ML.Transforms (12)
Expression\BuiltinFunctions.cs (4)
53return R4.NaN; 383return R4.NaN; 433return R4.NaN; 644return R4.NaN;
Expression\LambdaBinder.cs (1)
788return R4.NaN;
MissingValueReplacing.cs (1)
887node.AddAttribute("replaced_value_float", Single.NaN);
SvmLight\SvmLightLoader.cs (3)
118output.IsComment = float.NaN; 173intermediate.Label = float.NaN; 174intermediate.Weight = float.NaN;
Text\LdaTransform.cs (1)
505editor.Values[k] = float.NaN;
Text\WordEmbeddingsExtractor.cs (2)
715float[] firstValue = wordsInFirstLine.Skip(1).Select(x => float.TryParse(x, out temp) ? temp : Single.NaN).ToArray(); 716if (!firstValue.Contains(Single.NaN))
PresentationCore (1)
System\Windows\Input\Stylus\Common\StylusPoint.cs (1)
82(pressureFactor == Single.NaN || pressureFactor < 0.0f || pressureFactor > 1.0f))
ReachFramework (1)
AlphaFlattener\Utility.cs (1)
2285return NormalizeColorChannel(value, float.NaN);
System.Drawing.Common.Tests (151)
mono\System.Drawing\BitmapTests.cs (2)
1163public void SetResolution_NaN() => Assert.Throws<ArgumentException>(() => SetResolution(float.NaN, float.NaN));
System\Drawing\BitmapTests.cs (2)
983[InlineData(float.NaN)] 994[InlineData(float.NaN)]
System\Drawing\Drawing2D\AdjustableArrowCapTests.cs (2)
17yield return new object[] { float.NaN, 1f }; 61yield return new object[] { float.NaN };
System\Drawing\Drawing2D\CustomLineCapTests.cs (2)
177[InlineData(float.NaN)] 198[InlineData(float.NaN)]
System\Drawing\Drawing2D\GraphicsPathTests.cs (6)
2216Assert.Equal(float.NaN, path.PathPoints[0].X); 2217Assert.Equal(float.NaN, path.PathPoints[0].Y); 2218Assert.Equal(float.NaN, path.PathPoints[1].X); 2219Assert.Equal(float.NaN, path.PathPoints[1].Y); 2220Assert.Equal(float.NaN, path.PathPoints[2].X); 2221Assert.Equal(float.NaN, path.PathPoints[2].Y);
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (7)
40using LinearGradientBrush brush = new(new PointF(float.NaN, float.NaN), new PointF(float.PositiveInfinity, float.NegativeInfinity), Color.Plum, Color.Red); 43Assert.Equal(float.NaN, brush.Rectangle.Width); 44Assert.Equal(float.NaN, brush.Rectangle.Height); 277[InlineData(new float[] { float.NaN }, new float[] { float.NaN })] 888[InlineData(float.NaN)]
System\Drawing\Drawing2D\MatrixTests.cs (112)
51[InlineData(float.NaN)] 250[InlineData(float.NaN)] 301yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), new Matrix(float.NaN, float.NaN, float.NaN, float.NaN, float.NaN, float.NaN), MatrixOrder.Prepend, new float[] { float.NaN, float.NaN, float.NaN, float.NaN, float.NaN, float.NaN } }; 302yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), new Matrix(float.NaN, float.NaN, float.NaN, float.NaN, float.NaN, float.NaN), MatrixOrder.Append, new float[] { float.NaN, float.NaN, float.NaN, float.NaN, float.NaN, float.NaN } }; 427yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), float.NaN, PointF.Empty, MatrixOrder.Prepend, new float[] { float.NaN, float.NaN, float.NaN, float.NaN, 50, 60 }, new float[] { float.NaN, float.NaN, float.NaN, float.NaN, float.NaN, float.NaN }, false }; 428yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), float.NaN, PointF.Empty, MatrixOrder.Append, new float[] { float.NaN, float.NaN, float.NaN, float.NaN, float.NaN, float.NaN }, null, false }; 430yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), float.PositiveInfinity, PointF.Empty, MatrixOrder.Prepend, new float[] { float.NaN, float.NaN, float.NaN, float.NaN, 50, 60 }, new float[] { float.NaN, float.NaN, float.NaN, float.NaN, float.NaN, float.NaN }, false }; 431yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), float.PositiveInfinity, PointF.Empty, MatrixOrder.Append, new float[] { float.NaN, float.NaN, float.NaN, float.NaN, float.NaN, float.NaN }, null, false }; 433yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), float.NegativeInfinity, PointF.Empty, MatrixOrder.Prepend, new float[] { float.NaN, float.NaN, float.NaN, float.NaN, 50, 60 }, new float[] { float.NaN, float.NaN, float.NaN, float.NaN, float.NaN, float.NaN }, false }; 434yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), float.NegativeInfinity, PointF.Empty, MatrixOrder.Append, new float[] { float.NaN, float.NaN, float.NaN, float.NaN, float.NaN, float.NaN }, null, false }; 524yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), float.NaN, float.NaN, MatrixOrder.Prepend, new float[] { float.NaN, float.NaN, float.NaN, float.NaN, 50, 60 } }; 525yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), float.NaN, float.NaN, MatrixOrder.Append, new float[] { float.NaN, float.NaN, float.NaN, float.NaN, float.NaN, float.NaN } }; 590yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), float.NaN, float.NaN, MatrixOrder.Prepend, new float[] { float.NaN, float.NaN, float.NaN, float.NaN, 50, 60 } }; 591yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), float.NaN, float.NaN, MatrixOrder.Append, new float[] { float.NaN, float.NaN, float.NaN, float.NaN, float.NaN, float.NaN } }; 647yield return new object[] { new Matrix(1, 2, 3, 4, 5, 6), float.NaN, float.NaN, MatrixOrder.Prepend, new float[] { 1, 2, 3, 4, float.NaN, float.NaN } }; 648yield return new object[] { new Matrix(1, 2, 3, 4, 5, 6), float.NaN, float.NaN, MatrixOrder.Append, new float[] { 1, 2, 3, 4, float.NaN, float.NaN } };
System\Drawing\Drawing2D\PathGradientBrushTests.cs (2)
227centralPoint.X = float.NaN; 230Assert.Equal(float.NaN, brush.CenterPoint.X);
System\Drawing\FontTests.cs (3)
354[InlineData(float.NaN)] 511[InlineData(float.NaN, float.NaN)]
System\Drawing\GraphicsTests.cs (1)
645[InlineData(float.NaN)]
System\Drawing\Imaging\Effects\EffectsTests.cs (1)
237[InlineData(float.NaN)]
System\Drawing\PenTests.cs (9)
49yield return new object[] { new SolidBrush(Color.Red), float.NaN, PenType.SolidColor }; 106[InlineData(float.NaN)] 307[InlineData(new float[] { float.NaN, 0 })] 507[InlineData(float.NaN)] 530[InlineData(new float[] { float.MaxValue, float.NaN, float.PositiveInfinity })] 531[InlineData(new float[] { float.MaxValue, float.NaN })] 735[InlineData(float.NaN, float.NaN)] 1180[InlineData(float.NaN)]
System\Drawing\RegionTests.cs (1)
1948[InlineData(float.NaN)]
System\Drawing\StringFormatTests.cs (1)
149[InlineData(10, new float[] { 1, 2.3f, 4, float.PositiveInfinity, float.NaN })]
System.Numerics.Tensors (39)
System\Numerics\Tensors\TensorPrimitives.Single.cs (39)
26/// If a value is equal to <see cref="float.NaN"/>, the result stored into the corresponding destination location is the original NaN value with the sign bit removed. 45/// If either of the element-wise input values is equal to <see cref="float.NaN"/>, the resulting element-wise value is also NaN. 62/// If either of the element-wise input values is equal to <see cref="float.NaN"/>, the resulting element-wise value is also NaN. 83/// If any of the element-wise input values is equal to <see cref="float.NaN"/>, the resulting element-wise value is also NaN. 103/// If any of the element-wise input values is equal to <see cref="float.NaN"/>, the resulting element-wise value is also NaN. 123/// If any of the element-wise input values is equal to <see cref="float.NaN"/>, the resulting element-wise value is also NaN. 140/// If a value is equal to <see cref="float.NaN"/>, the result stored into the corresponding destination location is also NaN. 164/// If any element in either input tensor is equal to <see cref="float.NegativeInfinity"/>, <see cref="float.PositiveInfinity"/>, or <see cref="float.NaN"/>, 192/// If any element in either input tensor is equal to <see cref="float.NaN"/>, NaN is returned. 222/// If either of the element-wise input values is equal to <see cref="float.NaN"/>, the resulting element-wise value is also NaN. 239/// If either of the element-wise input values is equal to <see cref="float.NaN"/>, the resulting element-wise value is also NaN. 261/// If any of the input elements is equal to <see cref="float.NaN"/>, the resulting value is also NaN. 281/// If a value equals <see cref="float.NaN"/> or <see cref="float.PositiveInfinity"/>, the result stored into the corresponding destination location is set to NaN. 297/// The determination of the maximum element matches the IEEE 754:2019 `maximum` function. If any value equal to <see cref="float.NaN"/> 313/// The determination of the maximum magnitude matches the IEEE 754:2019 `maximumMagnitude` function. If any value equal to <see cref="float.NaN"/> 330/// The determination of the minimum element matches the IEEE 754:2019 `minimum` function. If any value equal to <see cref="float.NaN"/> 346/// The determination of the minimum magnitude matches the IEEE 754:2019 `minimumMagnitude` function. If any value equal to <see cref="float.NaN"/> 369/// If a value is negative or equal to <see cref="float.NaN"/>, the result stored into the corresponding destination location is set to NaN. 392/// If a value is negative or equal to <see cref="float.NaN"/>, the result stored into the corresponding destination location is set to NaN. 410/// The determination of the maximum element matches the IEEE 754:2019 `maximum` function. If any value equal to <see cref="float.NaN"/> 434/// The determination of the maximum element matches the IEEE 754:2019 `maximum` function. If either value is equal to <see cref="float.NaN"/>, 451/// The determination of the maximum magnitude matches the IEEE 754:2019 `maximumMagnitude` function. If any value equal to <see cref="float.NaN"/> 487/// The determination of the minimum element matches the IEEE 754:2019 `minimum` function. If any value is equal to <see cref="float.NaN"/> 511/// The determination of the maximum element matches the IEEE 754:2019 `maximum` function. If either value is equal to <see cref="float.NaN"/>, 528/// The determination of the minimum magnitude matches the IEEE 754:2019 `minimumMagnitude` function. If any value equal to <see cref="float.NaN"/> 551/// The determination of the maximum magnitude matches the IEEE 754:2019 `minimumMagnitude` function. If either value is equal to <see cref="float.NaN"/>, 576/// If either of the element-wise input values is equal to <see cref="float.NaN"/>, the resulting element-wise value is also NaN. 594/// If either of the element-wise input values is equal to <see cref="float.NaN"/>, the resulting element-wise value is also NaN. 615/// If either of the element-wise input values is equal to <see cref="float.NaN"/>, the resulting element-wise value is also NaN. 636/// If either of the element-wise input values is equal to <see cref="float.NaN"/>, the resulting element-wise value is also NaN. 656/// If either of the element-wise input values is equal to <see cref="float.NaN"/>, the resulting element-wise value is also NaN. 672/// If any of the element-wise input values is equal to <see cref="float.NaN"/>, the resulting element-wise value is also NaN. 688/// If any of the input values is equal to <see cref="float.NaN"/>, the result value is also NaN. 704/// If any of the input values is equal to <see cref="float.NaN"/>, the result value is also NaN. 818/// If a value is equal to <see cref="float.NegativeInfinity"/>, <see cref="float.PositiveInfinity"/>, or <see cref="float.NaN"/>, 880/// If either of the element-wise input values is equal to <see cref="float.NaN"/>, the resulting element-wise value is also NaN. 897/// If either of the element-wise input values is equal to <see cref="float.NaN"/>, the resulting element-wise value is also NaN. 908/// If any of the values in the input is equal to <see cref="float.NaN"/>, the result is also NaN. 972/// If a value is equal to <see cref="float.NaN"/>, the corresponding destination location is set to NaN.
System.Private.CoreLib (29)
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Float.cs (1)
40return TryParseAsSpecialFloatingPoint(source, float.PositiveInfinity, float.NegativeInfinity, float.NaN, out value, out bytesConsumed);
src\libraries\System.Private.CoreLib\src\System\MathF.cs (3)
157return float.NaN; 233return float.NaN; 238return float.NaN;
src\libraries\System.Private.CoreLib\src\System\Numerics\Matrix3x2.Impl.cs (1)
437Vector2 vNaN = Vector2.Create(float.NaN);
src\libraries\System.Private.CoreLib\src\System\Numerics\Matrix4x4.Impl.cs (2)
1389Vector4 vNaN = Vector4.Create(float.NaN); 1527Vector4 vNaN = Vector4.Create(float.NaN);
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector2.cs (1)
96get => Create(float.NaN);
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector3.cs (1)
109get => Create(float.NaN);
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector4.cs (3)
121/// <summary>Gets a vector whose elements are equal to <see cref="float.NaN" />.</summary> 122/// <value>A vector whose elements are equal to <see cref="float.NaN" /> (that is, it returns the vector <c>Create(float.NaN)</c>).</value> 126get => Create(float.NaN);
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\VectorMath.cs (3)
759result = TVectorSingle.ConditionalSelect(nanMask, TVectorSingle.Create(float.NaN), result); 1123TVectorSingle.Create(float.NaN), 1439TVectorSingle.Create(float.NaN),
src\libraries\System.Private.CoreLib\src\System\Single.cs (14)
792static float IFloatingPointIeee754<float>.NaN => NaN; 1554result = NaN; 1587result = NaN; 1607result = NaN; 1621result = NaN; 1631result = int.IsOddInteger(n) ? NegativeInfinity : NaN; 1652result = NaN; 1666result = NaN; 1676result = int.IsOddInteger(n) ? -0.0f : NaN; 1832result = NaN; 1974sinPi = NaN; 1975cosPi = NaN; 2058result = NaN; 2150result = NaN;
System.Private.Windows.Core.Tests (1)
System\Value\StoringFloat.cs (1)
14{ float.NaN },
System.Runtime.Numerics (1)
System\Numerics\Complex.cs (1)
1743float actualResult = (value.m_imaginary != 0) ? float.NaN : (float)value.m_real;
System.Text.Json (1)
System\Text\Json\Reader\JsonReaderHelper.cs (1)
187value = float.NaN;
System.Text.Json.SourceGeneration (1)
src\libraries\Common\src\SourceGenerators\CSharpSyntaxUtilities.cs (1)
43case float.NaN:
System.Windows.Forms.Primitives.Tests (2)
Interop\Oleaut32\VARIANTTests.cs (2)
533yield return new object[] { unchecked((nint)4290772992), float.NaN }; 550yield return new object[] { float.NaN };
System.Windows.Forms.Tests (2)
System\Windows\Forms\RichTextBoxTests.cs (2)
7779[InlineData(float.NaN, 1.0f)] 7800[InlineData(float.NaN, 1.0f)]
System.Windows.Input.Manipulations (25)
System\Windows\Input\Manipulations\InertiaExpansionBehavior2D.cs (8)
19private float desiredDeceleration = float.NaN; 20private float desiredExpansionX = float.NaN; 21private float desiredExpansionY = float.NaN; 22private float initialVelocityX = float.NaN; 23private float initialVelocityY = float.NaN; 95() => { this.desiredDeceleration = value; this.desiredExpansionX = this.desiredExpansionY = float.NaN; }, 136() => { this.desiredExpansionX = value; this.desiredDeceleration = float.NaN; }, 177() => { this.desiredExpansionY = value; this.desiredDeceleration = float.NaN; },
System\Windows\Input\Manipulations\InertiaProcessor2D.cs (2)
492this.initialExpansion.AbsoluteOffset = (behavior == null) ? float.NaN : behavior.DesiredExpansionX; 493this.initialExpansion.Velocity = (behavior == null) ? float.NaN : behavior.InitialVelocityX;
System\Windows\Input\Manipulations\InertiaRotationBehavior2D.cs (5)
15private float desiredDeceleration = float.NaN; 16private float desiredRotation = float.NaN; 17private float initialVelocity = float.NaN; 48() => { this.desiredDeceleration = value; this.desiredRotation = float.NaN; }, 91() => { this.desiredRotation = value; this.desiredDeceleration = float.NaN; },
System\Windows\Input\Manipulations\InertiaTranslationBehavior2D.cs (6)
16private float desiredDeceleration = float.NaN; 17private float desiredDisplacement = float.NaN; 18private float initialVelocityX = float.NaN; 19private float initialVelocityY = float.NaN; 49() => { this.desiredDeceleration = value; this.desiredDisplacement = float.NaN; }, 86() => { this.desiredDisplacement = value; this.desiredDeceleration = float.NaN; },
System\Windows\Input\Manipulations\ManipulationPivot2D.cs (3)
57private float x = float.NaN; 58private float y = float.NaN; 59private float radius = float.NaN;
System\Windows\Input\Manipulations\ManipulationSequence.cs (1)
258float result = float.NaN;