久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

轉(zhuǎn)換“十進(jìn)制或數(shù)字"時(shí)精度丟失/溢出的原因

the reason behind loss of precision/overflow when converting quot;decimal or numericquot; data type(轉(zhuǎn)換“十進(jìn)制或數(shù)字時(shí)精度丟失/溢出的原因;數(shù)據(jù)類型)
本文介紹了轉(zhuǎn)換“十進(jìn)制或數(shù)字"時(shí)精度丟失/溢出的原因;數(shù)據(jù)類型的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

我目前正在 MSDN 并遇到過以下短語.

I'm currently learning "numeric" data type on MSDN and have encountered the following phrase.

從十進(jìn)制或數(shù)字轉(zhuǎn)換為浮點(diǎn)數(shù)或?qū)崝?shù)會(huì)導(dǎo)致一些精度損失.從 int、smallint、tinyint、float 轉(zhuǎn)換,real、money 或 smallmoney 轉(zhuǎn)換為十進(jìn)制或數(shù)字可能會(huì)導(dǎo)致溢出.

Converting from decimal or numeric to float or real can cause some loss of precision. Converting from int, smallint, tinyint, float, real, money, or smallmoney to either decimal or numeric can cause overflow.

我真的不明白轉(zhuǎn)換十進(jìn)制或數(shù)字"數(shù)據(jù)類型時(shí)精度損失/溢出背后的原因.有人可以給我解釋一下嗎?

I dont really understand the reason behind loss of precision/overflow when converting "decimal or numeric" data type. Could someone please explain it to me?

推薦答案

Decimal 或 Numeric 數(shù)據(jù)類型實(shí)際上是帶有小數(shù)分隔符位置的整數(shù).關(guān)于聲明的精度,它們可以存儲(chǔ)最小值和最大值之間的每個(gè)值.正如 Ryan 所說,您可以在從 -32k 到 32k 的四個(gè)字節(jié)內(nèi)存儲(chǔ)大約 64k 個(gè)不同的值.如果你創(chuàng)建一個(gè)四字節(jié)的浮點(diǎn)類型,范圍會(huì)更廣,但仍然有 64k 不同的值要存儲(chǔ).范圍內(nèi)的某些值無法精確存儲(chǔ).

Decimal or Numeric data types are in fact integer with decimal separator position. They can store each value between min and max values, regarding declared precision. As Ryan said, you can store approx 64k different values within four bytes ranging from -32k to 32k. If you make a four bytes float type, the range would be much wider, but there are still 64k different values to be stored. Some of the values within the range are impossible to be stored precisely.

這篇關(guān)于轉(zhuǎn)換“十進(jìn)制或數(shù)字"時(shí)精度丟失/溢出的原因;數(shù)據(jù)類型的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

Modify Existing decimal places info(修改現(xiàn)有小數(shù)位信息)
The correlation name #39;CONVERT#39; is specified multiple times(多次指定相關(guān)名稱“CONVERT)
T-SQL left join not returning null columns(T-SQL 左連接不返回空列)
remove duplicates from comma or pipeline operator string(從逗號(hào)或管道運(yùn)算符字符串中刪除重復(fù)項(xiàng))
Change an iterative query to a relational set-based query(將迭代查詢更改為基于關(guān)系集的查詢)
concatenate a zero onto sql server select value shows 4 digits still and not 5(將零連接到 sql server 選擇值仍然顯示 4 位而不是 5)
主站蜘蛛池模板: 成人免费在线视频 | 激情三区| 久热精品在线 | 欧美一级片在线观看 | 久久久高清 | 色婷婷av一区二区三区软件 | 国产精品中文在线 | 免费在线成人 | 二区精品| 国产精品日韩一区 | 成人美女免费网站视频 | 久久99精品久久久久久 | 亚洲一区亚洲二区 | 中文字幕亚洲一区二区三区 | 黄色大片免费观看 | 久久精品亚洲精品国产欧美kt∨ | 网址黄 | 国产欧美精品一区二区 | 日本特黄a级高清免费大片 成年人黄色小视频 | 免费在线观看黄网站 | 日韩在线一区二区三区 | 午夜精品久久久久久久久久久久久 | 国产精品久久久久久福利一牛影视 | 午夜精品久久久久久 | 日韩精品视频在线 | 欧美久久大片 | 久久里面有精品 | 欧美精品一区二区在线观看 | 久久久久精 | 亚洲一区二区三区在线视频 | 色狠狠桃花综合 | 欧美日韩一卡二卡 | 亚洲一本| 亚洲综合色网站 | 亚洲精品一二三区 | 91九色在线观看 | 久久久91精品国产一区二区精品 | 伊人伊人网 | 精品亚洲一区二区 | 狠狠操狠狠操 | 日韩在线观看中文字幕 |