Content deleted Content added
→Value types: Added a response. |
→Suggest correction to "High-Precision Floating Point" row on the feature table: Decimal is floating-point |
||
Line 186:
== Suggest correction to "High-Precision Floating Point" row on the feature table ==
Decimal is a fixed-point type. It's the exact opposite of floating point. The only thing they have in common is that they both can have a decimal point in their string representations. <span style="font-size: smaller;" class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/66.193.1.106|66.193.1.106]] ([[User talk:66.193.1.106|talk]]) 14:15, 7 September 2011 (UTC)</span><!-- Template:Unsigned IP --> <!--Autosigned by SineBot-->
:Decimal is a [[Decimal floating point|floating-point]] type. It's modeled as -1<sup>sign</sup> * coefficient * 10<sup>-exponent</sup>. The exponent term determines where the decimal point will be, hence "floating-point." A [[Fixed-point arithmetic|fixed-point]] value is basically an integer with an assumed radix point at a predefined position. [http://msdn.microsoft.com/en-us/library/system.data.sqltypes.sqldecimal.aspx SqlDecimal] is closer to a fixed-point type, but the scale is still adjustable and it doesn't have the performance benefit that you might expect from a true fixed-point type. [[User:Maghnus|Maghnus]] ([[User talk:Maghnus|talk]]) 12:51, 15 September 2011 (UTC)
|