|
64 | 64 | <format type="text/markdown"><![CDATA[
|
65 | 65 |
|
66 | 66 | ## Remarks
|
67 |
| - The <xref:System.Double> value type represents a double-precision 64-bit number with values ranging from negative 1.79769313486232e308 to positive 1.79769313486232e308, as well as positive or negative zero, <xref:System.Double.PositiveInfinity>, <xref:System.Double.NegativeInfinity>, and not a number (<xref:System.Double.NaN>). It is intended to represent values that are extremely large (such as distances between planets or galaxies) or extremely small (the molecular mass of a substance in kilograms) and that often are imprecise (such as the distance from earth to another solar system), The <xref:System.Double> type complies with the IEC 60559:1989 (IEEE 754) standard for binary floating-point arithmetic. |
| 67 | + The <xref:System.Double> value type represents a double-precision 64-bit number with values ranging from negative 1.79769313486232e308 to positive 1.79769313486232e308, as well as positive or negative zero, <xref:System.Double.PositiveInfinity>, <xref:System.Double.NegativeInfinity>, and not a number (<xref:System.Double.NaN>). It is intended to represent values that are extremely large (such as distances between planets or galaxies) or extremely small (such as the molecular mass of a substance in kilograms) and that often are imprecise (such as the distance from earth to another solar system). The <xref:System.Double> type complies with the IEC 60559:1989 (IEEE 754) standard for binary floating-point arithmetic. |
68 | 68 |
|
69 | 69 | This topic consists of the following sections:
|
70 | 70 |
|
|
1815 | 1815 | <Docs>
|
1816 | 1816 | <summary>Converts the string representation of a number to its double-precision floating-point number equivalent.</summary>
|
1817 | 1817 | <altmember cref="Overload:System.Double.TryParse" />
|
| 1818 | + <remarks>In .NET Core 3.0 and later, values that are too large to represent are rounded to <see cref="F:System.Double.PositiveInfinity"/> or <see cref="F:System.Double.NegativeInfinity"/> as required by the IEEE 754 specification. In prior versions, including .NET Framework, parsing a value that was too large to represent resulted in failure.</remarks> |
1818 | 1819 | </Docs>
|
1819 | 1820 | </MemberGroup>
|
1820 | 1821 | <Member MemberName="Parse">
|
|
1861 | 1862 | <format type="text/markdown"><![CDATA[
|
1862 | 1863 |
|
1863 | 1864 | ## Remarks
|
| 1865 | + In .NET Core 3.0 and later, values that are too large to represent are rounded to <xref:System.Double.PositiveInfinity> or <xref:System.Double.NegativeInfinity> as required by the IEEE 754 specification. In prior versions, including .NET Framework, parsing a value that was too large to represent resulted in failure. |
| 1866 | +
|
1864 | 1867 | The `s` parameter can contain the current culture's <xref:System.Globalization.NumberFormatInfo.PositiveInfinitySymbol%2A?displayProperty=nameWithType>, <xref:System.Globalization.NumberFormatInfo.NegativeInfinitySymbol%2A?displayProperty=nameWithType>, <xref:System.Globalization.NumberFormatInfo.NaNSymbol%2A?displayProperty=nameWithType>, or a string of the form:
|
1865 | 1868 |
|
1866 | 1869 | [*ws*][*sign*][*integral-digits*[*,*]]*integral-digits*[*.*[*fractional-digits*]][E[*sign*]*exponential-digits*][*ws*]
|
@@ -1959,6 +1962,8 @@ If a separator is encountered in the `s` parameter during a parse operation, and
|
1959 | 1962 | <format type="text/markdown"><![CDATA[
|
1960 | 1963 |
|
1961 | 1964 | ## Remarks
|
| 1965 | + In .NET Core 3.0 and later, values that are too large to represent are rounded to <xref:System.Double.PositiveInfinity> or <xref:System.Double.NegativeInfinity> as required by the IEEE 754 specification. In prior versions, including .NET Framework, parsing a value that was too large to represent resulted in failure. |
| 1966 | +
|
1962 | 1967 | The `style` parameter defines the style elements (such as white space, thousands separators, and currency symbols) that are allowed in the `s` parameter for the parse operation to succeed. It must be a combination of bit flags from the <xref:System.Globalization.NumberStyles> enumeration. The following <xref:System.Globalization.NumberStyles> members are not supported:
|
1963 | 1968 |
|
1964 | 1969 | - <xref:System.Globalization.NumberStyles.AllowHexSpecifier>
|
@@ -2089,6 +2094,8 @@ If a separator is encountered in the `s` parameter during a parse operation, and
|
2089 | 2094 | <format type="text/markdown"><![CDATA[
|
2090 | 2095 |
|
2091 | 2096 | ## Remarks
|
| 2097 | + In .NET Core 3.0 and later, values that are too large to represent are rounded to <xref:System.Double.PositiveInfinity> or <xref:System.Double.NegativeInfinity> as required by the IEEE 754 specification. In prior versions, including .NET Framework, parsing a value that was too large to represent resulted in failure. |
| 2098 | +
|
2092 | 2099 | This overload of the <xref:System.Double.Parse%28System.String%2CSystem.IFormatProvider%29> method is typically used to convert text that can be formatted in a variety of ways to a <xref:System.Double> value. For example, it can be used to convert the text that is entered by a user into an HTML text box to a numeric value.
|
2093 | 2100 |
|
2094 | 2101 | The `s` parameter is interpreted using a combination of the <xref:System.Globalization.NumberStyles.Float?displayProperty=nameWithType> and <xref:System.Globalization.NumberStyles.AllowThousands?displayProperty=nameWithType> flags. The `s` parameter can contain <xref:System.Globalization.NumberFormatInfo.PositiveInfinitySymbol%2A?displayProperty=nameWithType>, <xref:System.Globalization.NumberFormatInfo.NegativeInfinitySymbol%2A?displayProperty=nameWithType>, or <xref:System.Globalization.NumberFormatInfo.NaNSymbol%2A?displayProperty=nameWithType> for the culture specified by `provider`, or it can contain a string of the form:
|
@@ -2177,6 +2184,8 @@ If a separator is encountered in the `s` parameter during a parse operation, and
|
2177 | 2184 | <remarks>
|
2178 | 2185 | <format type="text/markdown"><![CDATA[
|
2179 | 2186 |
|
| 2187 | +In .NET Core 3.0 and later, values that are too large to represent are rounded to <xref:System.Double.PositiveInfinity> or <xref:System.Double.NegativeInfinity> as required by the IEEE 754 specification. In prior versions, including .NET Framework, parsing a value that was too large to represent resulted in failure. |
| 2188 | +
|
2180 | 2189 | If `s` is out of range of the <xref:System.Double> data type, the method returns <xref:System.Double.NegativeInfinity?displayProperty=nameWithType> if `s` is less than <xref:System.Double.MinValue?displayProperty=nameWithType> and <xref:System.Double.PositiveInfinity?displayProperty=nameWithType> if `s` is greater than <xref:System.Double.MaxValue?displayProperty=nameWithType>.
|
2181 | 2190 |
|
2182 | 2191 | ]]></format>
|
@@ -2239,6 +2248,8 @@ If `s` is out of range of the <xref:System.Double> data type, the method returns
|
2239 | 2248 | <format type="text/markdown"><![CDATA[
|
2240 | 2249 |
|
2241 | 2250 | ## Remarks
|
| 2251 | + In .NET Core 3.0 and later, values that are too large to represent are rounded to <xref:System.Double.PositiveInfinity> or <xref:System.Double.NegativeInfinity> as required by the IEEE 754 specification. In prior versions, including .NET Framework, parsing a value that was too large to represent resulted in failure. |
| 2252 | +
|
2242 | 2253 | The `style` parameter defines the style elements (such as white space, thousands separators, and currency symbols) that are allowed in the `s` parameter for the parse operation to succeed. It must be a combination of bit flags from the <xref:System.Globalization.NumberStyles> enumeration. The following <xref:System.Globalization.NumberStyles> members are not supported:
|
2243 | 2254 |
|
2244 | 2255 | - <xref:System.Globalization.NumberStyles.AllowHexSpecifier>
|
@@ -3690,6 +3701,7 @@ If a separator is encountered in the `s` parameter during a parse operation, and
|
3690 | 3701 | </AssemblyInfo>
|
3691 | 3702 | <Docs>
|
3692 | 3703 | <summary>Converts the string representation of a number to its double-precision floating-point number equivalent. A return value indicates whether the conversion succeeded or failed.</summary>
|
| 3704 | + <remarks>In .NET Core 3.0 and later, values that are too large to represent are rounded to <see cref="F:System.Double.PositiveInfinity"/> or <see cref="F:System.Double.NegativeInfinity"/> as required by the IEEE 754 specification. In prior versions, including .NET Framework, parsing a value that was too large to represent resulted in failure.</remarks> |
3693 | 3705 | <altmember cref="Overload:System.Double.Parse" />
|
3694 | 3706 | </Docs>
|
3695 | 3707 | </MemberGroup>
|
@@ -3726,7 +3738,7 @@ If a separator is encountered in the `s` parameter during a parse operation, and
|
3726 | 3738 | <summary>Converts the span representation of a number in a specified style and culture-specific format to its double-precision floating-point number equivalent. A return value indicates whether the conversion succeeded or failed.</summary>
|
3727 | 3739 | <returns>
|
3728 | 3740 | <see langword="true" /> if <paramref name="s" /> was converted successfully; otherwise, <see langword="false" />.</returns>
|
3729 |
| - <remarks>To be added.</remarks> |
| 3741 | + <remarks>In .NET Core 3.0 and later, values that are too large to represent are rounded to <see cref="F:System.Double.PositiveInfinity"/> or <see cref="F:System.Double.NegativeInfinity"/> as required by the IEEE 754 specification. In prior versions, including .NET Framework, parsing a value that was too large to represent resulted in failure.</remarks> |
3730 | 3742 | </Docs>
|
3731 | 3743 | </Member>
|
3732 | 3744 | <Member MemberName="TryParse">
|
@@ -3780,6 +3792,8 @@ If a separator is encountered in the `s` parameter during a parse operation, and
|
3780 | 3792 | <format type="text/markdown"><![CDATA[
|
3781 | 3793 |
|
3782 | 3794 | ## Remarks
|
| 3795 | + In .NET Core 3.0 and later, values that are too large to represent are rounded to <xref:System.Double.PositiveInfinity> or <xref:System.Double.NegativeInfinity> as required by the IEEE 754 specification. In prior versions, including .NET Framework, parsing a value that was too large to represent resulted in failure. |
| 3796 | +
|
3783 | 3797 | This overload differs from the <xref:System.Double.Parse%28System.String%29?displayProperty=nameWithType> method by returning a Boolean value that indicates whether the parse operation succeeded instead of returning the parsed numeric value. It eliminates the need to use exception handling to test for a <xref:System.FormatException> in the event that `s` is invalid and cannot be successfully parsed.
|
3784 | 3798 |
|
3785 | 3799 | The `s` parameter can contain the current culture's <xref:System.Globalization.NumberFormatInfo.PositiveInfinitySymbol%2A?displayProperty=nameWithType>, <xref:System.Globalization.NumberFormatInfo.NegativeInfinitySymbol%2A?displayProperty=nameWithType>, <xref:System.Globalization.NumberFormatInfo.NaNSymbol%2A?displayProperty=nameWithType> (the string comparison is case-sensitive), or a string of the form:
|
@@ -3868,7 +3882,7 @@ If a separator is encountered in the `s` parameter during a parse operation, and
|
3868 | 3882 | <summary>Converts a character span containing the string representation of a number in a specified style and culture-specific format to its double-precision floating-point number equivalent. A return value indicates whether the conversion succeeded or failed.</summary>
|
3869 | 3883 | <returns>
|
3870 | 3884 | <see langword="true" /> if <paramref name="s" /> was converted successfully; otherwise, <see langword="false" />.</returns>
|
3871 |
| - <remarks>To be added.</remarks> |
| 3885 | + <remarks>In .NET Core 3.0 and later, values that are too large to represent are rounded to <see cref="F:System.Double.PositiveInfinity"/> or <see cref="F:System.Double.NegativeInfinity"/> as required by the IEEE 754 specification. In prior versions, including .NET Framework, parsing a value that was too large to represent resulted in failure.</remarks> |
3872 | 3886 | </Docs>
|
3873 | 3887 | </Member>
|
3874 | 3888 | <Member MemberName="TryParse">
|
@@ -3927,6 +3941,8 @@ If a separator is encountered in the `s` parameter during a parse operation, and
|
3927 | 3941 | <format type="text/markdown"><![CDATA[
|
3928 | 3942 |
|
3929 | 3943 | ## Remarks
|
| 3944 | + In .NET Core 3.0 and later, values that are too large to represent are rounded to <xref:System.Double.PositiveInfinity> or <xref:System.Double.NegativeInfinity> as required by the IEEE 754 specification. In prior versions, including .NET Framework, parsing a value that was too large to represent resulted in failure. |
| 3945 | +
|
3930 | 3946 | The <xref:System.Double.TryParse%2A> method is like the <xref:System.Double.Parse%28System.String%2CSystem.Globalization.NumberStyles%2CSystem.IFormatProvider%29> method, except this method does not throw an exception if the conversion fails. If the conversion succeeds, the return value is `true` and the `result` parameter is set to the outcome of the conversion. If the conversion fails, the return value is `false` and the `result` parameter is set to zero. This eliminates the need to use exception handling to test for a <xref:System.FormatException> in the event that `s` is invalid and cannot be successfully parsed.
|
3931 | 3947 |
|
3932 | 3948 | The `style` parameter defines the allowable format of the `s` parameter for the parse operation to succeed. It must be a combination of bit flags from the <xref:System.Globalization.NumberStyles> enumeration. The following <xref:System.Globalization.NumberStyles> members are not supported:
|
|
0 commit comments