199 references to MaxValue
BinaryFormatTests (6)
FormatTests\FormattedObject\BinaryFormatWriterTests.cs (2)
200new SizeF(float.MaxValue, float.MinValue), 201new SizeF(-float.MaxValue, float.PositiveInfinity),
FormatTests\FormattedObject\HashTableTests.cs (1)
211{ float.MinValue, float.MaxValue },
FormatTests\FormattedObject\ListTests.cs (1)
30float.MaxValue,
FormatTests\FormattedObject\PrimitiveTypeTests.cs (2)
71{ (byte)PrimitiveType.Single, float.MaxValue }, 128float.MaxValue,
dotnet-svcutil-lib (2)
FrameworkFork\System.Runtime.Serialization\System\Xml\ValueHandle.cs (1)
331if ((value >= Single.MinValue && value <= Single.MaxValue) || double.IsInfinity(value) || double.IsNaN(value))
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBinaryWriter.cs (1)
807if (d >= float.MinValue && d <= float.MaxValue && (f = (float)d) == d)
Microsoft.AspNetCore.Components.Tests (1)
RenderTreeDiffBuilderTest.cs (1)
1750tree.AddComponentParameter(1, "MyFloat", float.MaxValue);
Microsoft.AspNetCore.Http.Extensions.Tests (1)
RequestDelegateGenerator\RequestDelegateCreationTests.SpecialTypes.cs (1)
189new object[] { "float", "float.MaxValue", float.MaxValue, true },
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (2)
81{ float.MaxValue, nameof(float.MaxValue) },
Microsoft.CodeAnalysis.CSharp (1)
Utilities\ValueSetFactory.SingleTC.cs (1)
46if (value == float.MaxValue)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\NullableConversionTests.cs (2)
766Diagnostic(ErrorCode.ERR_ConstOutOfRangeChecked, "(int?)float.MaxValue").WithArguments(float.MaxValue.ToString(), "int").WithLocation(22, 13), 790Diagnostic(ErrorCode.ERR_ConstOutOfRangeChecked, "(int)float.MaxValue").WithArguments(float.MaxValue.ToString(), "int").WithLocation(36, 13),
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Syntax\SyntaxFactoryTests.cs (1)
351CheckLiteralToString(float.MaxValue, @"3.4028235E+38F");
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
CodeGeneration\SyntaxGeneratorTests.cs (1)
87VerifySyntax<MemberAccessExpressionSyntax>(Generator.LiteralExpression(float.MaxValue), "global::System.Single.MaxValue");
Microsoft.CodeAnalysis.VisualBasic (2)
Semantics\CompileTimeCalculations.vb (2)
535If value > Single.MaxValue OrElse value < Single.MinValue Then 563If value > Single.MaxValue OrElse value < Single.MinValue Then
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (2)
Semantics\Conversions.vb (2)
586New TypeAndValue(singleType, Single.MaxValue), 1147New TypeAndValue(singleType, Single.MaxValue),
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (1)
Syntax\SyntaxFactoryTests.vb (1)
88CheckLiteralToString(Single.MaxValue, "3.4028235E+38F")
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (1)
CodeGeneration\SyntaxGeneratorTests.vb (1)
83VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.LiteralExpression(Single.MaxValue), "Global.System.Single.MaxValue")
Microsoft.CodeAnalysis.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (2)
81{ float.MaxValue, nameof(float.MaxValue) },
Microsoft.CodeAnalysis.Workspaces.UnitTests (5)
ObjectSerializationTests.cs (5)
290TestRoundTripValue(Single.MaxValue); 425writer.WriteSingle(Single.MaxValue); 449Assert.Equal(Single.MaxValue, reader.ReadSingle()); 479writer.WriteScalarValue(Single.MaxValue); 517Assert.Equal(Single.MaxValue, (Single)reader.ReadScalarValue());
Microsoft.Data.Analysis (3)
PrimitiveDataFrameColumnComputations.cs (3)
2308var ret = float.MaxValue; 2525var value = float.MaxValue; 2548var value = float.MaxValue;
Microsoft.DotNet.XUnitAssert.Tests (3)
EqualityAssertsTests.cs (3)
2279 Assert.Equal(float.MinValue, float.MaxValue, float.PositiveInfinity); 4245 var ex = Record.Exception(() => Assert.NotEqual(float.MinValue, float.MaxValue, float.PositiveInfinity)); 4251 $"Actual: {float.MaxValue:G9}",
Microsoft.Maui.Graphics (2)
GradientPaint.cs (2)
187 var before = float.MaxValue; 189 var after = float.MaxValue;
Microsoft.ML.Core (2)
Utilities\BinFinder.cs (2)
226if (a == Single.MaxValue) 228b = Single.MaxValue;
Microsoft.ML.Data (1)
Prediction\Calibrator.cs (1)
1099Min = float.MaxValue;
Microsoft.ML.FastTree (1)
GamModelParameters.cs (1)
385writer.WriteLine($"{-1:D}\t{float.MaxValue:R}\t{Bias:R}");
Microsoft.ML.KMeansClustering (1)
KMeansPlusPlusTrainer.cs (1)
593_bestWeight[i] = float.MaxValue;
Microsoft.ML.LightGbm (1)
LightGbmMulticlassTrainer.cs (1)
276float minLabel = float.MaxValue;
Microsoft.ML.Samples (2)
Dynamic\Transforms\NormalizeLogMeanVariance.cs (1)
20new DataPoint(){ Features = new float[5] { 1, 1, 3, 0, float.MaxValue } },
Dynamic\Transforms\NormalizeLogMeanVarianceFixZero.cs (1)
20new DataPoint(){ Features = new float[5] { 1, 1, 3, 0, float.MaxValue } },
Microsoft.ML.TestFramework (1)
DataPipe\TestDataPipe.cs (1)
24Single.MaxValue, Single.Epsilon, Single.NegativeInfinity, Single.PositiveInfinity };
Microsoft.ML.Tests (7)
CollectionsDataViewTest.cs (2)
119fFloat = float.MaxValue - 1, 134fFloat = float.MaxValue,
Transformers\ConvertTests.cs (3)
163AM = new float[]{ float.MinValue, float.MaxValue,}, 231AM = new float[]{ float.MinValue, float.MaxValue,}, 243ConvM = new float[] { float.MinValue, float.MaxValue },
Transformers\NormalizerTests.cs (2)
940new DataPointVec(){ Features = new float[5] { 1, 1, 3, 0, float.MaxValue } }, 1183min = float.MaxValue;
Microsoft.ML.Tokenizers (1)
Model\SentencePieceUnigramModel.cs (1)
40_minScore = float.MaxValue;
Microsoft.ML.Transforms (5)
MissingValueReplacingUtils.cs (3)
550Ch.Assert(float.MinValue <= val && val <= float.MaxValue); 570Ch.Assert(float.MinValue <= val && val <= float.MaxValue); 594Ch.Assert(float.MinValue <= val && val <= float.MaxValue);
Text\WordEmbeddingsExtractor.cs (2)
429tensorD.AddRange(Enumerable.Repeat(float.MaxValue, _parent._currentVocab.Dimension)); 574editor.Values[i] = float.MaxValue;
Microsoft.ML.Vision (1)
ImageClassificationTrainer.cs (1)
263_bestMetricValue = Single.MaxValue;
Microsoft.VisualBasic.Core (7)
Microsoft\VisualBasic\CompilerServices\Conversions.vb (1)
1599If (Result < Single.MinValue OrElse Result > Single.MaxValue) AndAlso
Microsoft\VisualBasic\CompilerServices\ObjectType.vb (3)
1780If ((result <= Single.MaxValue AndAlso result >= Single.MinValue)) Then 2098If ((result <= Single.MaxValue AndAlso result >= Single.MinValue)) Then 2402If ((result <= Single.MaxValue AndAlso result >= Single.MinValue)) Then
Microsoft\VisualBasic\CompilerServices\Operators.vb (3)
2914If ((result <= Single.MaxValue AndAlso result >= Single.MinValue)) Then 3382If ((result <= Single.MaxValue AndAlso result >= Single.MinValue)) Then 3837If ((result <= Single.MaxValue AndAlso result >= Single.MinValue)) Then
Microsoft.VisualStudio.LanguageServices (1)
NavigateTo\RoslynNavigateToSearchCallback.cs (1)
71var perProviderItemPriority = float.MaxValue - Enumerable.Sum(result.Matches.Select(m => (int)m.Kind));
PresentationCore (6)
System\Windows\Media3D\Rect3D.cs (6)
636_x = -float.MaxValue, 637_y = -float.MaxValue, 638_z = -float.MaxValue, 639_sizeX = float.MaxValue * 2.0, 640_sizeY = float.MaxValue * 2.0, 641_sizeZ = float.MaxValue * 2.0
System.Data.Common (2)
System\Data\Common\SingleStorage.cs (1)
103float min = float.MaxValue;
System\Data\SQLTypes\SQLSingle.cs (1)
452public static readonly SqlSingle MaxValue = new SqlSingle(float.MaxValue);
System.Drawing.Common.Tests (99)
mono\System.Drawing\BitmapTests.cs (2)
1157public void SetResolution_MaxValue() => SetResolution(float.MaxValue, float.MaxValue);
mono\System.Drawing\GraphicsTests.cs (4)
2038Region[] max = Measure_Helper(gfx, new RectangleF(0, 0, float.MaxValue, float.MaxValue), useSpan); 2567Assert.Throws<ArgumentNullException>(() => g.DrawImage(null, float.MaxValue, float.MinValue)); 2575Assert.Throws<OverflowException>(() => g.DrawImage(bmp, float.MaxValue, float.MinValue));
System\Drawing\BitmapTests.cs (2)
973[InlineData(float.MaxValue, float.MaxValue)]
System\Drawing\Drawing2D\AdjustableArrowCapTests.cs (3)
12yield return new object[] { float.MaxValue, float.MaxValue }; 58yield return new object[] { float.MaxValue };
System\Drawing\Drawing2D\CustomLineCapTests.cs (3)
13yield return new object[] { new GraphicsPath(), null, LineCap.Triangle, float.MaxValue, LineCap.Triangle }; 173[InlineData(float.MaxValue)] 194[InlineData(float.MaxValue)]
System\Drawing\Drawing2D\GraphicsPathTests.cs (2)
505gpi.AddCurve(intPoints, float.MaxValue); 508gpf.AddCurve(floatPoints, float.MaxValue);
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (2)
272[InlineData(new float[] { float.MaxValue }, new float[] { float.MaxValue })]
System\Drawing\Drawing2D\MatrixTests.cs (60)
310yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), new Matrix(float.MaxValue, float.MaxValue, float.MaxValue, float.MaxValue, float.MaxValue, float.MaxValue), MatrixOrder.Prepend, new float[] { float.MaxValue, float.MaxValue, float.MaxValue, float.MaxValue, float.MaxValue, float.MaxValue } }; 311yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), new Matrix(float.MaxValue, float.MaxValue, float.MaxValue, float.MaxValue, float.MaxValue, float.MaxValue), MatrixOrder.Append, new float[] { float.MaxValue, float.MaxValue, float.MaxValue, float.MaxValue, float.MaxValue, float.MaxValue } }; 533yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), float.MaxValue, float.MaxValue, MatrixOrder.Prepend, new float[] { float.MaxValue, float.MaxValue, float.MaxValue, float.MaxValue, 50, 60 } }; 534yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), float.MaxValue, float.MaxValue, MatrixOrder.Append, new float[] { float.MaxValue, float.MaxValue, float.MaxValue, float.MaxValue, float.MaxValue, float.MaxValue } }; 599yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), float.MaxValue, float.MaxValue, MatrixOrder.Prepend, new float[] { float.MaxValue, float.MaxValue, float.MaxValue, float.MaxValue, 50, 60 } }; 600yield return new object[] { new Matrix(10, 20, 30, 40, 50, 60), float.MaxValue, float.MaxValue, MatrixOrder.Append, new float[] { float.MaxValue, float.MaxValue, float.MaxValue, float.MaxValue, float.MaxValue, float.MaxValue } }; 656yield return new object[] { new Matrix(1, 2, 3, 4, 5, 6), float.MaxValue, float.MaxValue, MatrixOrder.Prepend, new float[] { 1, 2, 3, 4, float.MaxValue, float.MaxValue } }; 657yield return new object[] { new Matrix(1, 2, 3, 4, 5, 6), float.MaxValue, float.MaxValue, MatrixOrder.Append, new float[] { 1, 2, 3, 4, float.MaxValue, float.MaxValue } };
System\Drawing\Drawing2D\PathGradientBrushTests.cs (5)
219PointF centralPoint = new(float.MaxValue, float.MinValue); 818matrix.Scale(float.MaxValue, float.MinValue, MatrixOrder.Prepend); 819brush.ScaleTransform(float.MaxValue, float.MinValue); 822matrix.Scale(float.MinValue, float.MaxValue, MatrixOrder.Prepend); 823brush.ScaleTransform(float.MinValue, float.MaxValue);
System\Drawing\FontTests.cs (7)
14yield return new object[] { FontFamily.GenericSerif, float.MaxValue }; 20yield return new object[] { FontFamily.GenericSerif, float.MaxValue }; 94yield return new object[] { FontFamily.GenericSerif, float.MaxValue, FontStyle.Underline }; 136yield return new object[] { FontFamily.GenericSerif, float.MaxValue, GraphicsUnit.Pixel }; 176yield return new object[] { FontFamily.GenericSerif, float.MaxValue, FontStyle.Underline, GraphicsUnit.Pixel }; 218yield return new object[] { FontFamily.GenericSerif, float.MaxValue, FontStyle.Underline, GraphicsUnit.Pixel, 10 }; 260yield return new object[] { FontFamily.GenericSerif, float.MaxValue, FontStyle.Underline, GraphicsUnit.Pixel, 10, true };
System\Drawing\PenTests.cs (4)
50yield return new object[] { new SolidBrush(Color.Red), float.MaxValue, PenType.SolidColor }; 340[InlineData(new float[] { float.MaxValue, 0 })] 530[InlineData(new float[] { float.MaxValue, float.NaN, float.PositiveInfinity })] 531[InlineData(new float[] { float.MaxValue, float.NaN })]
System\Drawing\RegionTests.cs (5)
69[InlineData(float.MaxValue, float.MaxValue, float.MaxValue, float.MaxValue, true)] 1946[InlineData(float.MaxValue)]
System.Private.CoreLib (6)
src\libraries\System.Private.CoreLib\src\System\MathF.cs (1)
61return (bits == float.PositiveInfinityBits) ? float.MaxValue : x;
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\CharacterFrequencyHelper.cs (1)
85float minFrequency = float.MaxValue;
src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
910static float IMinMaxValue<float>.MaxValue => MaxValue;
src\System\GC.CoreCLR.cs (3)
585private static float s_previousMemoryLoad = float.MaxValue; 596if (s_previousMemoryLoad == float.MaxValue) 612s_previousMemoryLoad = float.MaxValue;
System.Private.DataContractSerialization (1)
System\Xml\ValueHandle.cs (1)
317if ((value >= float.MinValue && value <= float.MaxValue) || !double.IsFinite(value))
System.Private.Windows.Core.Tests (4)
System\Private\Windows\Ole\BinaryFormatUtilitiesTests.cs (3)
61new SizeF(float.MaxValue, float.MinValue), 77new List<float> { float.MinValue, float.MaxValue }, 97new float[] { float.MinValue, float.MaxValue },
System\Value\StoringFloat.cs (1)
12{ float.MaxValue },
System.Text.Json (3)
System\Text\Json\Document\JsonElement.cs (2)
911/// <see cref="float.MaxValue"/> (or smaller than <see cref="float.MinValue"/>), 945/// <see cref="float.MaxValue"/> (or smaller than <see cref="float.MinValue"/>).
System\Text\Json\Reader\Utf8JsonReader.TryGet.cs (1)
583/// than <see cref="float.MaxValue"/>.
System.Windows.Forms.Tests (8)
System\Resources\ResxDataNodeTests.cs (1)
134{ float.MinValue, float.MaxValue },
System\Windows\Forms\AxHost.PropertyBagStreamTests.cs (1)
101float.MaxValue,
System\Windows\Forms\ColumnStyleTests.cs (3)
50[InlineData(float.MaxValue)] 67[InlineData(float.MaxValue, 1)] 97[InlineData(float.MaxValue, 1)]
System\Windows\Forms\RowStyleTests.cs (3)
50[InlineData(float.MaxValue)] 67[InlineData(float.MaxValue, 1)] 97[InlineData(float.MaxValue, 1)]
System.Windows.Input.Manipulations (1)
System\Windows\Input\Manipulations\ManipulationSequence.cs (1)
754return float.IsNegativeInfinity(value) ? float.MinValue : float.MaxValue;