426 references to NaN
BinaryFormatTests (3)
FormatTests\FormattedObject\BinaryFormatWriterTests.cs (1)
223
new float[] { 1.0f, float.
NaN
, float.PositiveInfinity },
FormatTests\FormattedObject\ListTests.cs (1)
93
new 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)
43
case float.
NaN
:
Microsoft.AspNetCore.App.Analyzers (1)
src\Shared\RoslynUtils\SymbolExtensions.cs (1)
193
float 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)
183
new object[] { "float", "float.NaN", float.
NaN
, true },
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
src\Shared\RoslynUtils\SymbolExtensions.cs (1)
193
float f when f is float.
NaN
=> "float.NaN",
Microsoft.AspNetCore.Http.ValidationsGenerator (1)
src\Shared\RoslynUtils\SymbolExtensions.cs (1)
193
float 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)
740
float.
NaN
=> "float.NaN",
Utilities\ValueSetFactory.SingleTC.cs (1)
22
float FloatingTC<float>.NaN => float.
NaN
;
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Semantics\PatternSwitchTests.cs (1)
1367
Diagnostic(ErrorCode.ERR_DuplicateCaseLabel, "case -float.NaN:").WithArguments((-float.
NaN
).ToString()).WithLocation(68, 13),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (5)
Semantics\NullableConversionTests.cs (2)
769
Diagnostic(ErrorCode.ERR_ConstOutOfRangeChecked, "(int?)float.NaN").WithArguments(float.
NaN
.ToString(), "int").WithLocation(23, 13),
793
Diagnostic(ErrorCode.ERR_ConstOutOfRangeChecked, "(int)float.NaN").WithArguments(float.
NaN
.ToString(), "int").WithLocation(37, 13),
Utilities\ValueSetTests.cs (3)
345
Assert.Equal("NaN", ForFloat.Related(Equal, float.
NaN
).ToString());
347
Assert.True(ForFloat.Related(Equal, float.
NaN
).Any(Equal, float.
NaN
));
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
CodeGeneration\SyntaxGeneratorTests.cs (1)
89
VerifySyntax<MemberAccessExpressionSyntax>(Generator.LiteralExpression(float.
NaN
), "global::System.Single.NaN");
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (1)
CodeGeneration\SyntaxGeneratorTests.vb (1)
85
VerifySyntax(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)
164
Assert.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)
47
dataBuilder.AddColumn("Nan", NumberDataViewType.Single, new float[] { 0, 1, 0, 1, float.
NaN
});
76
new float[] { 1, float.
NaN
},
Microsoft.ML.Core (6)
Utilities\DoubleParser.cs (4)
118
value = Single.
NaN
;
137
value = Single.
NaN
;
500
value = Single.
NaN
;
507
value = Single.
NaN
;
Utilities\MathUtils.cs (2)
709
return float.
NaN
;
721
return float.
NaN
;
Microsoft.ML.Core.Tests (4)
UnitTests\DataTypes.cs (2)
34
float fVal = float.
NaN
;
44
Assert.Equal(float.
NaN
, fVal);
UnitTests\TestUtilities.cs (2)
74
x[0] = float.
NaN
;
108
x[0] = float.
NaN
;
Microsoft.ML.CpuMath (2)
AlignedArray.cs (2)
72
Items[i] = float.
NaN
;
74
Items[i] = float.
NaN
;
Microsoft.ML.Data (21)
Data\Conversion.cs (3)
802
private void GetNA(ref R4 value) => value = R4.
NaN
;
1380
dst = R4.
NaN
;
1688
value = R4.
NaN
;
Data\RowCursorUtils.cs (2)
409
dst = Single.
NaN
;
443
editor.Values[kv.Key] = Single.
NaN
;
DataLoadSave\Database\DatabaseLoaderCursor.cs (3)
346
return (ref float value) => value = DataReader.IsDBNull(columnIndex) ? float.
NaN
: DataReader.GetFloat(columnIndex);
629
editor.Values[i] = DataReader.IsDBNull(columnIndex) ? float.
NaN
: DataReader.GetFloat(columnIndex);
635
editor.Values[i++] = DataReader.IsDBNull(columnIndex) ? float.
NaN
: DataReader.GetFloat(columnIndex);
EntryPoints\EntryPointNode.cs (4)
469
string stageId = "", float cost = float.
NaN
, string label = null, string group = null, string weight = null,
563
float cost = float.
NaN
)
597
float cost = float.
NaN
)
913
var cost = node[FieldNames.Cost] == null ? float.
NaN
: node[FieldNames.Cost].Value<float>();
Evaluators\AnomalyDetectionEvaluator.cs (1)
256
thresholdAtK = thresholdAtP = thresholdAtNumPos = Single.
NaN
;
Evaluators\BinaryClassifierEvaluator.cs (2)
638
_probGetter = (ref Single value) => value = Single.
NaN
;
1161
ValueGetter<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)
392
ValueGetter<float> nanGetter = (ref float value) => value = Single.
NaN
;
Evaluators\RankingEvaluator.cs (2)
446
_currentQueryWeight = Single.
NaN
;
520
_currentQueryWeight = Single.
NaN
;
Evaluators\RegressionEvaluator.cs (1)
280
ValueGetter<float> nan = (ref float value) => value = Single.
NaN
;
Microsoft.ML.Ensemble (1)
OutputCombiners\BaseMultiCombiner.cs (1)
103
editor.Values[i] = Single.
NaN
;
Microsoft.ML.Fairlearn (8)
Reductions\UtilityParity.cs (8)
33
public UtilityParity(float differenceBound = Single.
NaN
, float ratioBond = Single.
NaN
, float ratioBoundSlack = 0.0f)
35
if (Single.
NaN
.Equals(differenceBound) && Single.
NaN
.Equals(ratioBond))
40
else if (!Single.
NaN
.Equals(differenceBound) && Single.
NaN
.Equals(ratioBond))
45
else if (Single.
NaN
.Equals(differenceBound) && !Single.
NaN
.Equals(ratioBond))
Microsoft.ML.FastTree (3)
RandomForestRegression.cs (1)
77
return float.
NaN
;
TreeEnsembleFeaturizer.cs (2)
761
dst = Single.
NaN
;
781
dst = Single.
NaN
;
Microsoft.ML.Mkl.Components (1)
OlsLinearRegression.cs (1)
771
Double[] standardErrors = null, Double[] tValues = null, Double[] pValues = null, Double rSquared = 1, Double rSquaredAdjusted = float.
NaN
)
Microsoft.ML.Parquet (1)
ParquetLoader.cs (1)
705
public void Conv(in float? src, ref Single dst) => dst = src ?? Single.
NaN
;
Microsoft.ML.Recommender (1)
MatrixFactorizationPredictor.cs (1)
277
dst = float.
NaN
;
Microsoft.ML.ResultProcessor (1)
ResultProcessor.cs (1)
947
perFoldMetrics[metricValues.Key] = new ResultMetric(float.
NaN
)
Microsoft.ML.Samples (18)
Dynamic\DataOperations\FilterRowsByMissingValues.cs (3)
22
new DataPoint(){ Feature1 = 21, Feature2 = new [] { 1, 2, float.
NaN
}
26
new DataPoint(){ Feature1 = float.
NaN
, Feature2 = new [] { 1, 2,
27
float.
NaN
} }
Dynamic\Transforms\FeatureSelection\SelectFeaturesBasedOnCount.cs (2)
87
NumericVector = new float[] { 4, float.
NaN
, 6 },
102
NumericVector = new float[] { 4, 0, float.
NaN
},
Dynamic\Transforms\FeatureSelection\SelectFeaturesBasedOnCountMultiColumn.cs (3)
87
NumericVector = new float[] { 4, float.
NaN
, 6 },
102
NumericVector = new float[] { 4, float.
NaN
, float.
NaN
},
Dynamic\Transforms\IndicateMissingValues.cs (2)
21
new DataPoint(){ Features = new float[3] {0, float.
NaN
, 1} },
22
new DataPoint(){ Features = new float[3] {-1, float.
NaN
, -3} },
Dynamic\Transforms\IndicateMissingValuesMultiColumn.cs (3)
22
new DataPoint(){ Features1 = new float[3] {0, float.
NaN
, 1},
23
Features2 = new float[2] {float.
NaN
, 1} },
25
new DataPoint(){ Features1 = new float[3] {-1, float.
NaN
, -3},
Dynamic\Transforms\ReplaceMissingValues.cs (2)
24
new DataPoint(){ Features = new float[3] {0, float.
NaN
, 1} },
26
new DataPoint(){ Features = new float[3] {-1, float.
NaN
, -3} },
Dynamic\Transforms\ReplaceMissingValuesMultiColumn.cs (3)
23
new DataPoint(){ Features1 = new float[3] {0, float.
NaN
, 1},
26
new DataPoint(){ Features1 = new float[3] {-1, float.
NaN
, -3},
27
Features2 = new float[2] {-1, float.
NaN
} },
Microsoft.ML.SamplesUtils (1)
SamplesDatasetUtils.cs (1)
318
float value = float.
NaN
;
Microsoft.ML.StandardTrainers (2)
Optimizer\LineSearch.cs (1)
292
_step = Value = float.
NaN
;
Standard\Simple\SimpleTrainers.cs (1)
292
float prob = prob = pos + neg > 0 ? (float)(pos / (pos + neg)) : float.
NaN
;
Microsoft.ML.TestFramework (1)
DataPipe\TestDataPipe.cs (1)
23
private static float[] _dataFloat = new float[] { -0.0f, 0, 1, -1, 2, -2, Single.
NaN
, Single.MinValue,
Microsoft.ML.Tests (35)
ExpressionLanguageTests\ExpressionLanguageTests.cs (1)
538
return R4.
NaN
;
OnnxConversionTest.cs (2)
1157
new DataPoint() { Features = new float[3] {0, float.
NaN
, 1}, },
1158
new DataPoint() { Features = new float[3] {-1, float.
NaN
, float.PositiveInfinity}, },
TextLoaderTests.cs (7)
1021
Assert.Equal(Single.
NaN
, feature);
1100
Assert.NotEqual(Single.
NaN
, featuresPeriodArray[i]);
1107
Assert.Equal(Single.
NaN
, featuresPeriodArray[i]);
1112
Assert.Equal(Single.
NaN
, featuresPeriodArray[i]);
1113
Assert.NotEqual(Single.
NaN
, featuresCommaArray[i]);
1118
Assert.NotEqual(Single.
NaN
, featuresPeriodArray[i]);
1119
Assert.Equal(Single.
NaN
, featuresCommaArray[i]);
TrainerEstimators\TreeEnsembleFeaturizerTest.cs (1)
796
rowWithFloat.FloatLabel = rowWithKey.KeyLabel == 0 ? float.
NaN
: rowWithKey.KeyLabel - 1;
Transformers\ConvertTests.cs (2)
205
ConvA = new float[] { float.
NaN
, float.
NaN
},
Transformers\HashTests.cs (2)
305
HashTestCore(float.
NaN
, NumberDataViewType.Single, 0, 0, 0, 0, 0);
379
new TestClass() { A = float.
NaN
, B = 3, C = 12 }
Transformers\NAIndicatorTests.cs (9)
40
new TestClass() { A = float.
NaN
, B = double.NaN, C = new float[2]{ float.
NaN
, float.
NaN
} , D = new double[2]{ double.NaN,double.NaN}},
68
new TestClass() { A = float.
NaN
, B = double.NaN, C = new float[2]{ float.
NaN
, float.
NaN
} , D = new double[2]{ double.NaN,double.NaN}},
131
new 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)
60
new TestClass { A = 2f, B = 2d, C = new float[] { float.
NaN
, 9f }, D = new double[] { double.NaN, 9f } },
61
new TestClass { A = float.
NaN
, B = double.NaN, C = new float[] { 2f, float.
NaN
}, D = new double[] { 2f, double.NaN } },
63
new TestClass{ A = float.
NaN
, B = double.NaN, C = new float[] { 1f, float.
NaN
}, D = new double[] { 1f, double.NaN } },
105
new TestClass() { A = float.
NaN
, B = double.NaN, C= new float[2]{ float.
NaN
, float.
NaN
} , D = new double[2]{ double.NaN,double.NaN}},
163
new 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)
192
public Single LastValue { get { return _buffer.Count > 0 ? _buffer[_buffer.Count - 1] : Single.
NaN
; } }
ExponentialAverageTransform.cs (1)
114
output = Single.
NaN
;
MovingAverageTransform.cs (5)
142
return nb == 0 ? Single.
NaN
: sumValues / nb;
170
return sumWeights != 0 ? sumValues / sumWeights : Single.
NaN
;
234
return nb == 0 ? Single.
NaN
: currentSum / nb;
240
return nb == 0 ? Single.
NaN
: currentSum / nb;
266
output = Single.
NaN
;
PValueTransform.cs (1)
117
dst = Single.
NaN
;
SequentialForecastingTransformBase.cs (1)
301
editor.Values[i] = float.
NaN
;
Microsoft.ML.Transforms (12)
Expression\BuiltinFunctions.cs (4)
53
return R4.
NaN
;
383
return R4.
NaN
;
433
return R4.
NaN
;
644
return R4.
NaN
;
Expression\LambdaBinder.cs (1)
788
return R4.
NaN
;
MissingValueReplacing.cs (1)
887
node.AddAttribute("replaced_value_float", Single.
NaN
);
SvmLight\SvmLightLoader.cs (3)
118
output.IsComment = float.
NaN
;
173
intermediate.Label = float.
NaN
;
174
intermediate.Weight = float.
NaN
;
Text\LdaTransform.cs (1)
505
editor.Values[k] = float.
NaN
;
Text\WordEmbeddingsExtractor.cs (2)
715
float[] firstValue = wordsInFirstLine.Skip(1).Select(x => float.TryParse(x, out temp) ? temp : Single.
NaN
).ToArray();
716
if (!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)
2285
return NormalizeColorChannel(value, float.
NaN
);
System.Drawing.Common.Tests (151)
mono\System.Drawing\BitmapTests.cs (2)
1163
public 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)
17
yield return new object[] { float.
NaN
, 1f };
61
yield 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)
2216
Assert.Equal(float.
NaN
, path.PathPoints[0].X);
2217
Assert.Equal(float.
NaN
, path.PathPoints[0].Y);
2218
Assert.Equal(float.
NaN
, path.PathPoints[1].X);
2219
Assert.Equal(float.
NaN
, path.PathPoints[1].Y);
2220
Assert.Equal(float.
NaN
, path.PathPoints[2].X);
2221
Assert.Equal(float.
NaN
, path.PathPoints[2].Y);
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (7)
40
using LinearGradientBrush brush = new(new PointF(float.
NaN
, float.
NaN
), new PointF(float.PositiveInfinity, float.NegativeInfinity), Color.Plum, Color.Red);
43
Assert.Equal(float.
NaN
, brush.Rectangle.Width);
44
Assert.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
)]
301
yield 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
} };
302
yield 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
} };
427
yield 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 };
428
yield 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 };
430
yield 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 };
431
yield 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 };
433
yield 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 };
434
yield 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 };
524
yield 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 } };
525
yield 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
} };
590
yield 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 } };
591
yield 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
} };
647
yield 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
} };
648
yield 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)
227
centralPoint.X = float.
NaN
;
230
Assert.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)
49
yield 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)
40
return TryParseAsSpecialFloatingPoint(source, float.PositiveInfinity, float.NegativeInfinity, float.
NaN
, out value, out bytesConsumed);
src\libraries\System.Private.CoreLib\src\System\MathF.cs (3)
157
return float.
NaN
;
233
return float.
NaN
;
238
return float.
NaN
;
src\libraries\System.Private.CoreLib\src\System\Numerics\Matrix3x2.Impl.cs (1)
437
Vector2 vNaN = Vector2.Create(float.
NaN
);
src\libraries\System.Private.CoreLib\src\System\Numerics\Matrix4x4.Impl.cs (2)
1389
Vector4 vNaN = Vector4.Create(float.
NaN
);
1527
Vector4 vNaN = Vector4.Create(float.
NaN
);
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector2.cs (1)
96
get => Create(float.
NaN
);
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector3.cs (1)
109
get => 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>
126
get => Create(float.
NaN
);
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\VectorMath.cs (3)
759
result = TVectorSingle.ConditionalSelect(nanMask, TVectorSingle.Create(float.
NaN
), result);
1123
TVectorSingle.Create(float.
NaN
),
1439
TVectorSingle.Create(float.
NaN
),
src\libraries\System.Private.CoreLib\src\System\Single.cs (14)
792
static float IFloatingPointIeee754<float>.NaN =>
NaN
;
1554
result =
NaN
;
1587
result =
NaN
;
1607
result =
NaN
;
1621
result =
NaN
;
1631
result = int.IsOddInteger(n) ? NegativeInfinity :
NaN
;
1652
result =
NaN
;
1666
result =
NaN
;
1676
result = int.IsOddInteger(n) ? -0.0f :
NaN
;
1832
result =
NaN
;
1974
sinPi =
NaN
;
1975
cosPi =
NaN
;
2058
result =
NaN
;
2150
result =
NaN
;
System.Private.Windows.Core.Tests (1)
System\Value\StoringFloat.cs (1)
14
{ float.
NaN
},
System.Runtime.Numerics (1)
System\Numerics\Complex.cs (1)
1743
float actualResult = (value.m_imaginary != 0) ? float.
NaN
: (float)value.m_real;
System.Text.Json (1)
System\Text\Json\Reader\JsonReaderHelper.cs (1)
187
value = float.
NaN
;
System.Text.Json.SourceGeneration (1)
src\libraries\Common\src\SourceGenerators\CSharpSyntaxUtilities.cs (1)
43
case float.
NaN
:
System.Windows.Forms.Primitives.Tests (2)
Interop\Oleaut32\VARIANTTests.cs (2)
533
yield return new object[] { unchecked((nint)4290772992), float.
NaN
};
550
yield 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)
19
private float desiredDeceleration = float.
NaN
;
20
private float desiredExpansionX = float.
NaN
;
21
private float desiredExpansionY = float.
NaN
;
22
private float initialVelocityX = float.
NaN
;
23
private 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)
492
this.initialExpansion.AbsoluteOffset = (behavior == null) ? float.
NaN
: behavior.DesiredExpansionX;
493
this.initialExpansion.Velocity = (behavior == null) ? float.
NaN
: behavior.InitialVelocityX;
System\Windows\Input\Manipulations\InertiaRotationBehavior2D.cs (5)
15
private float desiredDeceleration = float.
NaN
;
16
private float desiredRotation = float.
NaN
;
17
private 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)
16
private float desiredDeceleration = float.
NaN
;
17
private float desiredDisplacement = float.
NaN
;
18
private float initialVelocityX = float.
NaN
;
19
private 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)
57
private float x = float.
NaN
;
58
private float y = float.
NaN
;
59
private float radius = float.
NaN
;
System\Windows\Input\Manipulations\ManipulationSequence.cs (1)
258
float result = float.
NaN
;