197 references to NegativeInfinity
BinaryFormatTests (2)
FormatTests\FormattedObject\ListTests.cs (1)
93new List<float>() { float.NaN, float.PositiveInfinity, float.NegativeInfinity, float.NegativeZero },
FormatTests\FormattedObject\PrimitiveTypeTests.cs (1)
75{ (byte)PrimitiveType.Single, float.NegativeInfinity },
ConfigurationSchemaGenerator (1)
RuntimeSource\SourceGenerators\CSharpSyntaxUtilities.cs (1)
39case float.NegativeInfinity:
dotnet-svcutil-lib (2)
FrameworkFork\Microsoft.Xml\Xml\XmlConvert.cs (2)
1135if (s == "-INF") return Single.NegativeInfinity; 1150result = Single.NegativeInfinity;
Microsoft.AspNetCore.App.Analyzers (1)
src\Shared\RoslynUtils\SymbolExtensions.cs (1)
191float f when f is float.NegativeInfinity => "float.NegativeInfinity",
Microsoft.AspNetCore.Http.Extensions.Tests (1)
RequestDelegateGenerator\RequestDelegateCreationTests.SpecialTypes.cs (1)
185new object[] { "float", "float.NegativeInfinity", float.NegativeInfinity, true },
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
src\Shared\RoslynUtils\SymbolExtensions.cs (1)
191float f when f is float.NegativeInfinity => "float.NegativeInfinity",
Microsoft.AspNetCore.Http.ValidationsGenerator (1)
src\Shared\RoslynUtils\SymbolExtensions.cs (1)
191float f when f is float.NegativeInfinity => "float.NegativeInfinity",
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (2)
84{ float.NegativeInfinity, nameof(float.NegativeInfinity) },
Microsoft.CodeAnalysis.CSharp (4)
Binder\PatternExplainer.cs (1)
741float.NegativeInfinity => "float.NegativeInfinity",
Utilities\ValueSetFactory.SingleTC.cs (3)
18float INumericTC<float>.MinValue => float.NegativeInfinity; 42if (value == float.NegativeInfinity) 96value == float.NegativeInfinity ? "-Inf" :
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (3)
Semantics\NullableConversionTests.cs (2)
772Diagnostic(ErrorCode.ERR_ConstOutOfRangeChecked, "(int?)float.NegativeInfinity").WithArguments(float.NegativeInfinity.ToString(), "int").WithLocation(24, 13), 796Diagnostic(ErrorCode.ERR_ConstOutOfRangeChecked, "(int)float.NegativeInfinity").WithArguments(float.NegativeInfinity.ToString(), "int").WithLocation(38, 13),
Utilities\ValueSetTests.cs (1)
351Assert.Equal("[-Inf..-Inf]", ForFloat.Related(Equal, float.NegativeInfinity).ToString());
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
CodeGeneration\SyntaxGeneratorTests.cs (1)
90VerifySyntax<MemberAccessExpressionSyntax>(Generator.LiteralExpression(float.NegativeInfinity), "global::System.Single.NegativeInfinity");
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (1)
CodeGeneration\SyntaxGeneratorTests.vb (1)
86VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.LiteralExpression(Single.NegativeInfinity), "Global.System.Single.NegativeInfinity")
Microsoft.CodeAnalysis.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (2)
84{ float.NegativeInfinity, nameof(float.NegativeInfinity) },
Microsoft.DotNet.XUnitAssert.Tests (5)
EqualityAssertsTests.cs (5)
2221 var ex = Record.Exception(() => Assert.Equal(0.0f, 1.0f, float.NegativeInfinity)); 2307 var ex = Record.Exception(() => Assert.Equal(0.0f, float.NegativeInfinity, 1.0f)); 2313 $"Actual: {float.NegativeInfinity}", 4183 var ex = Record.Exception(() => Assert.NotEqual(0.0f, 1.0f, float.NegativeInfinity)); 4265 Assert.NotEqual(0.0f, float.NegativeInfinity, 1.0f);
Microsoft.ML.AutoML (2)
Sweepers\Parameters.cs (2)
378float prevValue = float.NegativeInfinity; 391float prevValue = float.NegativeInfinity;
Microsoft.ML.Core (9)
Utilities\DoubleParser.cs (2)
525value = Single.NegativeInfinity; 532value = Single.NegativeInfinity;
Utilities\MathUtils.cs (6)
113float result = float.NegativeInfinity; 149float max = float.NegativeInfinity; 206float max = float.NegativeInfinity; 217return float.NegativeInfinity; 686float maxOut = float.NegativeInfinity; 801float max = float.NegativeInfinity;
Utilities\SupervisedBinFinder.cs (1)
84Single curValue = Single.NegativeInfinity;
Microsoft.ML.Data (4)
Evaluators\BinaryClassifierEvaluator.cs (1)
748.Concat(new[] { new RocInfo() { Score = Single.NegativeInfinity } }))
Prediction\Calibrator.cs (2)
2014float maxPrev = float.NegativeInfinity; 2068float maxPrev = float.NegativeInfinity;
Transforms\NormalizeColumnSng.cs (1)
334_max[i] = TFloat.NegativeInfinity;
Microsoft.ML.FastTree (4)
Training\EarlyStoppingCriteria.cs (4)
90_bestScore = LowerIsBetter ? float.PositiveInfinity : float.NegativeInfinity; 250float recentBestScore = LowerIsBetter ? float.PositiveInfinity : float.NegativeInfinity; 501_prevScore = LowerIsBetter ? float.PositiveInfinity : float.NegativeInfinity; 509_prevScore = LowerIsBetter ? float.PositiveInfinity : float.NegativeInfinity;
Microsoft.ML.StandardTrainers (2)
Optimizer\DifferentiableFunction.cs (1)
196float maxNormDiff = float.NegativeInfinity;
Optimizer\OptimizationMonitor.cs (1)
308_bestBoundOnMin = float.NegativeInfinity;
Microsoft.ML.Sweeper (2)
Parameters.cs (2)
392float prevValue = float.NegativeInfinity; 405float prevValue = float.NegativeInfinity;
Microsoft.ML.TestFramework (1)
DataPipe\TestDataPipe.cs (1)
24Single.MaxValue, Single.Epsilon, Single.NegativeInfinity, Single.PositiveInfinity };
Microsoft.ML.Tests (16)
Transformers\ConvertTests.cs (1)
244ConvN = new float[] { float.NegativeInfinity, float.PositiveInfinity },
Transformers\NAIndicatorTests.cs (9)
41new TestClass() { A = float.NegativeInfinity, B = double.NegativeInfinity, C = new float[2]{ float.NegativeInfinity, float.NegativeInfinity } , D = new double[2]{ double.NegativeInfinity, double.NegativeInfinity}}, 69new TestClass() { A = float.NegativeInfinity, B = double.NegativeInfinity, C = new float[2]{ float.NegativeInfinity, float.NegativeInfinity } , D = new double[2]{ double.NegativeInfinity, double.NegativeInfinity}}, 132new TestClass() { A = float.NegativeInfinity, B = double.NegativeInfinity, C = new float[2]{ float.NegativeInfinity, float.NegativeInfinity } , D = new double[2]{ double.NegativeInfinity, double.NegativeInfinity}},
Transformers\NAReplaceTests.cs (6)
106new TestClass() { A = float.NegativeInfinity, B = double.NegativeInfinity,C= new float[2]{ float.NegativeInfinity, float.NegativeInfinity } , D = new double[2]{ double.NegativeInfinity, double.NegativeInfinity}}, 164new TestClass() { A = float.NegativeInfinity, B = double.NegativeInfinity,C= new float[2]{ float.NegativeInfinity, float.NegativeInfinity } , D = new double[2]{ double.NegativeInfinity, double.NegativeInfinity}},
Microsoft.ML.TorchSharp (1)
NasBert\Modules\MultiHeadAttention.cs (1)
279.masked_fill(keyPaddingMaskPad, float.NegativeInfinity)
Microsoft.ML.Transforms (3)
MissingValueReplacingUtils.cs (3)
606Stat = ReturnMax ? float.NegativeInfinity : float.PositiveInfinity; 627Stat = ReturnMax ? float.NegativeInfinity : float.PositiveInfinity; 659float bound = ReturnMax ? float.NegativeInfinity : float.PositiveInfinity;
System.Drawing.Common.Tests (92)
mono\System.Drawing\BitmapTests.cs (2)
1166public void SetResolution_NegativeInfinity() => Assert.Throws<ArgumentException>(() => SetResolution(float.NegativeInfinity, float.NegativeInfinity));
System\Drawing\BitmapTests.cs (2)
984[InlineData(float.NegativeInfinity)] 995[InlineData(float.NegativeInfinity)]
System\Drawing\Drawing2D\AdjustableArrowCapTests.cs (2)
16yield return new object[] { float.NegativeInfinity, 1f }; 60yield return new object[] { float.NegativeInfinity };
System\Drawing\Drawing2D\CustomLineCapTests.cs (2)
176[InlineData(float.NegativeInfinity)] 197[InlineData(float.NegativeInfinity)]
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (6)
40using LinearGradientBrush brush = new(new PointF(float.NaN, float.NaN), new PointF(float.PositiveInfinity, float.NegativeInfinity), Color.Plum, Color.Red); 42Assert.Equal(float.NegativeInfinity, brush.Rectangle.Y); 899[InlineData(float.NegativeInfinity)] 911[InlineData(float.NegativeInfinity)] 959[InlineData(float.NegativeInfinity)] 971[InlineData(float.NegativeInfinity)]
System\Drawing\Drawing2D\MatrixTests.cs (64)
52[InlineData(float.NegativeInfinity)] 252[InlineData(float.NegativeInfinity)] 307yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), new Matrix(float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity), MatrixOrder.Prepend, new float[] { float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity } }; 308yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), new Matrix(float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity), MatrixOrder.Append, new float[] { float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity } }; 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 }; 530yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), float.NegativeInfinity, float.NegativeInfinity, MatrixOrder.Prepend, new float[] { float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity, 50, 60 } }; 531yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), float.NegativeInfinity, float.NegativeInfinity, MatrixOrder.Append, new float[] { float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity } }; 596yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), float.NegativeInfinity, float.NegativeInfinity, MatrixOrder.Prepend, new float[] { float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity, 50, 60 } }; 597yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), float.NegativeInfinity, float.NegativeInfinity, MatrixOrder.Append, new float[] { float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity } }; 653yield return new object[] { new Matrix(1, 2, 3, 4, 5, 6), float.NegativeInfinity, float.NegativeInfinity, MatrixOrder.Prepend, new float[] { 1, 2, 3, 4, float.NegativeInfinity, float.NegativeInfinity } }; 654yield return new object[] { new Matrix(1, 2, 3, 4, 5, 6), float.NegativeInfinity, float.NegativeInfinity, MatrixOrder.Append, new float[] { 1, 2, 3, 4, float.NegativeInfinity, float.NegativeInfinity } };
System\Drawing\Drawing2D\PathGradientBrushTests.cs (2)
228centralPoint.Y = float.NegativeInfinity; 231Assert.Equal(float.NegativeInfinity, brush.CenterPoint.Y);
System\Drawing\FontTests.cs (3)
355[InlineData(float.NegativeInfinity)] 513[InlineData(float.NegativeInfinity, float.NegativeInfinity)]
System\Drawing\GraphicsTests.cs (1)
658[InlineData(float.NegativeInfinity)]
System\Drawing\PenTests.cs (5)
338[InlineData(new float[] { float.NegativeInfinity, 0 })] 505[InlineData(float.NegativeInfinity)] 565[InlineData(new float[] { float.NegativeInfinity })] 733[InlineData(float.NegativeInfinity, 1)] 1178[InlineData(float.NegativeInfinity)]
System\Drawing\RegionTests.cs (2)
65[InlineData(1, 2, 3, float.NegativeInfinity, true)] 1950[InlineData(float.NegativeInfinity)]
System\Drawing\StringFormatTests.cs (1)
177Assert.Throws<NotImplementedException>(() => format.SetTabStops(0, [float.NegativeInfinity]));
System.Numerics.Tensors (8)
System\Numerics\Tensors\TensorPrimitives.Single.cs (8)
25/// If a value is equal to <see cref="float.NegativeInfinity"/> or <see cref="float.PositiveInfinity"/>, the result stored into the corresponding destination location is set to <see cref="float.PositiveInfinity"/>. 139/// If a value is equal to <see cref="float.NegativeInfinity"/> or <see cref="float.PositiveInfinity"/>, the result stored into the corresponding destination location is set to <see cref="float.PositiveInfinity"/>. 164/// If any element in either input tensor is equal to <see cref="float.NegativeInfinity"/>, <see cref="float.PositiveInfinity"/>, or <see cref="float.NaN"/>, 282/// If a value equals <see cref="float.NegativeInfinity"/>, the result stored into the corresponding destination location is set to 0. 368/// If a value equals 0, the result stored into the corresponding destination location is set to <see cref="float.NegativeInfinity"/>. 391/// If a value equals 0, the result stored into the corresponding destination location is set to <see cref="float.NegativeInfinity"/>. 818/// If a value is equal to <see cref="float.NegativeInfinity"/>, <see cref="float.PositiveInfinity"/>, or <see cref="float.NaN"/>, 970/// If a value is equal to <see cref="float.NegativeInfinity"/>, the corresponding destination location is set to -1.
System.Private.CoreLib (17)
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\Numerics\Vector.cs (1)
1473return Equals(vector, Create(float.NegativeInfinity).As<float, T>());
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector2.cs (1)
103get => Create(float.NegativeInfinity);
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector3.cs (1)
116get => Create(float.NegativeInfinity);
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector4.cs (3)
129/// <summary>Gets a vector whose elements are equal to <see cref="float.NegativeInfinity" />.</summary> 130/// <value>A vector whose elements are equal to <see cref="float.NegativeInfinity" /> (that is, it returns the vector <c>Create(float.NegativeInfinity)</c>).</value> 134get => Create(float.NegativeInfinity);
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128.cs (1)
1954return Equals(vector, Create(float.NegativeInfinity).As<float, T>());
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector256.cs (1)
2058return Equals(vector, Create(float.NegativeInfinity).As<float, T>());
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector512.cs (1)
2085return Equals(vector, Create(float.NegativeInfinity).As<float, T>());
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector64.cs (1)
1891return Equals(vector, Create(float.NegativeInfinity).As<float, T>());
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\VectorMath.cs (2)
1132TVectorSingle.Create(float.NegativeInfinity), 1448TVectorSingle.Create(float.NegativeInfinity),
src\libraries\System.Private.CoreLib\src\System\Single.cs (4)
218return f == NegativeInfinity; 795static float IFloatingPointIeee754<float>.NegativeInfinity => NegativeInfinity; 1631result = int.IsOddInteger(n) ? NegativeInfinity : NaN; 2110result = +sign * (int.IsOddInteger(integral) ? NegativeInfinity : PositiveInfinity);
System.Private.Windows.Core.Tests (1)
System\Value\StoringFloat.cs (1)
15{ float.NegativeInfinity },
System.Private.Xml (2)
System\Xml\XmlConvert.cs (2)
962return float.NegativeInfinity; 982result = float.NegativeInfinity;
System.Text.Json (3)
System\Text\Json\Document\JsonElement.cs (2)
913/// <see cref="float.NegativeInfinity"/>) is emitted. 944/// <see cref="float.NegativeInfinity"/>) for values larger than
System\Text\Json\Reader\JsonReaderHelper.cs (1)
203value = float.NegativeInfinity;
System.Text.Json.SourceGeneration (1)
src\libraries\Common\src\SourceGenerators\CSharpSyntaxUtilities.cs (1)
39case float.NegativeInfinity:
System.Windows.Forms (1)
System\Windows\Forms\Rendering\ControlPaint.cs (1)
2256=> value is float.NegativeInfinity or float.PositiveInfinity ? 1.0f : value;
System.Windows.Forms.Tests (1)
System\Windows\Forms\RichTextBoxTests.cs (1)
7834[InlineData(float.NegativeInfinity)]