+If `s` is out of range of the <xref:System.Double> data type, the method throws an <xref:System.OverflowException> on .NET Framework and .NET Core 2.2 and earlier versions. On .NET Core 3.0 and later versions, no exception is thrown when `s` is out of range of the <xref:System.Double> data type. In most cases, the method will return <xref:System.Double.PositiveInfinity?displayProperty=nameWithType> or <xref:System.Double.NegativeInfinity?displayProperty=nameWithType>. However, there is a small set of values that are considered to be closer to the maximum or minimum values of <xref:System.Double> than to positive or negative infinity. In those cases, the method returns <xref:System.Double.MaxValue?displayProperty=nameWithType> or <xref:System.Double.MinValue?displayProperty=nameWithType>. Specifically, if `s` is greater than <xref:System.Double.MaxValue?displayProperty=nameWithType> but less than `double.MaxValue + (double.MaxValue - Math.BitDecrement(double.MaxValue))`, the method returns <xref:System.Double.MaxValue?displayProperty=nameWithType>. Similarly, if `s` is less than <xref:System.Double.MinValue?displayProperty=nameWithType> but greater than `double.MinValue - (double.MinValue + Math.BitDecrement(double.MinValue))`, the method returns <xref:System.Double.MinValue?displayProperty=nameWithType>.
0 commit comments