197 references to NegativeInfinity
BinaryFormatTests (2)
FormatTests\FormattedObject\ListTests.cs (1)
93
new 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)
39
case float.
NegativeInfinity
:
dotnet-svcutil-lib (2)
FrameworkFork\Microsoft.Xml\Xml\XmlConvert.cs (2)
1135
if (s == "-INF") return Single.
NegativeInfinity
;
1150
result = Single.
NegativeInfinity
;
Microsoft.AspNetCore.App.Analyzers (1)
src\Shared\RoslynUtils\SymbolExtensions.cs (1)
191
float f when f is float.
NegativeInfinity
=> "float.NegativeInfinity",
Microsoft.AspNetCore.Http.Extensions.Tests (1)
RequestDelegateGenerator\RequestDelegateCreationTests.SpecialTypes.cs (1)
185
new object[] { "float", "float.NegativeInfinity", float.
NegativeInfinity
, true },
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
src\Shared\RoslynUtils\SymbolExtensions.cs (1)
191
float f when f is float.
NegativeInfinity
=> "float.NegativeInfinity",
Microsoft.AspNetCore.Http.ValidationsGenerator (1)
src\Shared\RoslynUtils\SymbolExtensions.cs (1)
191
float 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)
741
float.
NegativeInfinity
=> "float.NegativeInfinity",
Utilities\ValueSetFactory.SingleTC.cs (3)
18
float INumericTC<float>.MinValue => float.
NegativeInfinity
;
42
if (value == float.
NegativeInfinity
)
96
value == float.
NegativeInfinity
? "-Inf" :
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (3)
Semantics\NullableConversionTests.cs (2)
772
Diagnostic(ErrorCode.ERR_ConstOutOfRangeChecked, "(int?)float.NegativeInfinity").WithArguments(float.
NegativeInfinity
.ToString(), "int").WithLocation(24, 13),
796
Diagnostic(ErrorCode.ERR_ConstOutOfRangeChecked, "(int)float.NegativeInfinity").WithArguments(float.
NegativeInfinity
.ToString(), "int").WithLocation(38, 13),
Utilities\ValueSetTests.cs (1)
351
Assert.Equal("[-Inf..-Inf]", ForFloat.Related(Equal, float.
NegativeInfinity
).ToString());
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
CodeGeneration\SyntaxGeneratorTests.cs (1)
90
VerifySyntax<MemberAccessExpressionSyntax>(Generator.LiteralExpression(float.
NegativeInfinity
), "global::System.Single.NegativeInfinity");
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (1)
CodeGeneration\SyntaxGeneratorTests.vb (1)
86
VerifySyntax(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)
378
float prevValue = float.
NegativeInfinity
;
391
float prevValue = float.
NegativeInfinity
;
Microsoft.ML.Core (9)
Utilities\DoubleParser.cs (2)
525
value = Single.
NegativeInfinity
;
532
value = Single.
NegativeInfinity
;
Utilities\MathUtils.cs (6)
113
float result = float.
NegativeInfinity
;
149
float max = float.
NegativeInfinity
;
206
float max = float.
NegativeInfinity
;
217
return float.
NegativeInfinity
;
686
float maxOut = float.
NegativeInfinity
;
801
float max = float.
NegativeInfinity
;
Utilities\SupervisedBinFinder.cs (1)
84
Single curValue = Single.
NegativeInfinity
;
Microsoft.ML.Data (4)
Evaluators\BinaryClassifierEvaluator.cs (1)
748
.Concat(new[] { new RocInfo() { Score = Single.
NegativeInfinity
} }))
Prediction\Calibrator.cs (2)
2014
float maxPrev = float.
NegativeInfinity
;
2068
float 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
;
250
float 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)
196
float maxNormDiff = float.
NegativeInfinity
;
Optimizer\OptimizationMonitor.cs (1)
308
_bestBoundOnMin = float.
NegativeInfinity
;
Microsoft.ML.Sweeper (2)
Parameters.cs (2)
392
float prevValue = float.
NegativeInfinity
;
405
float prevValue = float.
NegativeInfinity
;
Microsoft.ML.TestFramework (1)
DataPipe\TestDataPipe.cs (1)
24
Single.MaxValue, Single.Epsilon, Single.
NegativeInfinity
, Single.PositiveInfinity };
Microsoft.ML.Tests (16)
Transformers\ConvertTests.cs (1)
244
ConvN = new float[] { float.
NegativeInfinity
, float.PositiveInfinity },
Transformers\NAIndicatorTests.cs (9)
41
new TestClass() { A = float.
NegativeInfinity
, B = double.NegativeInfinity, C = new float[2]{ float.
NegativeInfinity
, float.
NegativeInfinity
} , D = new double[2]{ double.NegativeInfinity, double.NegativeInfinity}},
69
new TestClass() { A = float.
NegativeInfinity
, B = double.NegativeInfinity, C = new float[2]{ float.
NegativeInfinity
, float.
NegativeInfinity
} , D = new double[2]{ double.NegativeInfinity, double.NegativeInfinity}},
132
new 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)
106
new TestClass() { A = float.
NegativeInfinity
, B = double.NegativeInfinity,C= new float[2]{ float.
NegativeInfinity
, float.
NegativeInfinity
} , D = new double[2]{ double.NegativeInfinity, double.NegativeInfinity}},
164
new 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)
606
Stat = ReturnMax ? float.
NegativeInfinity
: float.PositiveInfinity;
627
Stat = ReturnMax ? float.
NegativeInfinity
: float.PositiveInfinity;
659
float bound = ReturnMax ? float.
NegativeInfinity
: float.PositiveInfinity;
System.Drawing.Common.Tests (92)
mono\System.Drawing\BitmapTests.cs (2)
1166
public 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)
16
yield return new object[] { float.
NegativeInfinity
, 1f };
60
yield 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)
40
using LinearGradientBrush brush = new(new PointF(float.NaN, float.NaN), new PointF(float.PositiveInfinity, float.
NegativeInfinity
), Color.Plum, Color.Red);
42
Assert.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
)]
307
yield 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
} };
308
yield 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
} };
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 };
530
yield 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 } };
531
yield 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
} };
596
yield 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 } };
597
yield 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
} };
653
yield 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
} };
654
yield 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)
228
centralPoint.Y = float.
NegativeInfinity
;
231
Assert.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)
177
Assert.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)
40
return TryParseAsSpecialFloatingPoint(source, float.PositiveInfinity, float.
NegativeInfinity
, float.NaN, out value, out bytesConsumed);
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector.cs (1)
1473
return Equals(vector, Create(float.
NegativeInfinity
).As<float, T>());
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector2.cs (1)
103
get => Create(float.
NegativeInfinity
);
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector3.cs (1)
116
get => 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>
134
get => Create(float.
NegativeInfinity
);
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128.cs (1)
1954
return Equals(vector, Create(float.
NegativeInfinity
).As<float, T>());
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector256.cs (1)
2058
return Equals(vector, Create(float.
NegativeInfinity
).As<float, T>());
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector512.cs (1)
2085
return Equals(vector, Create(float.
NegativeInfinity
).As<float, T>());
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector64.cs (1)
1891
return Equals(vector, Create(float.
NegativeInfinity
).As<float, T>());
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\VectorMath.cs (2)
1132
TVectorSingle.Create(float.
NegativeInfinity
),
1448
TVectorSingle.Create(float.
NegativeInfinity
),
src\libraries\System.Private.CoreLib\src\System\Single.cs (4)
218
return f ==
NegativeInfinity
;
795
static float IFloatingPointIeee754<float>.NegativeInfinity =>
NegativeInfinity
;
1631
result = int.IsOddInteger(n) ?
NegativeInfinity
: NaN;
2110
result = +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)
962
return float.
NegativeInfinity
;
982
result = 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)
203
value = float.
NegativeInfinity
;
System.Text.Json.SourceGeneration (1)
src\libraries\Common\src\SourceGenerators\CSharpSyntaxUtilities.cs (1)
39
case 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
)]