🔢 小数计算器Decimal Calculator
精确的小数加减乘除,不会出现 0.1+0.2=0.30000000000000004 这样的浮点误差;除法可指定保留位数。Exact decimal add, subtract, multiply and divide with no floating-point errors like 0.1 + 0.2 = 0.30000000000000004; set the precision for division.
使用说明与常见问题How-to & FAQ
「小数计算器」是什么?What is the Decimal Calculator tool?
精确的小数加减乘除,不会出现 0.1+0.2=0.30000000000000004 这样的浮点误差;除法可指定保留位数。Exact decimal add, subtract, multiply and divide with no floating-point errors like 0.1 + 0.2 = 0.30000000000000004; set the precision for division.
如何使用「小数计算器」?How do I use the Decimal Calculator tool?
在「小数计算器」中,填写「数 A」、「运算」、「数 B」、「除法保留位数」等参数,结果会随输入实时计算并显示在下方。In the Decimal Calculator: Fill in "Number A", "Operation", "Number B", "Division decimal places"; results are recalculated instantly as you type.
为什么普通计算器会算出 0.30000000000000004?Why do some calculators show 0.30000000000000004?
大多数程序用二进制浮点数,0.1 和 0.2 无法精确表示。本工具把小数当作十进制大整数运算(BigInt),加减乘结果完全精确。Most software uses binary floating point, which cannot store 0.1 or 0.2 exactly. This tool works in decimal with big integers (BigInt), so +, − and × are exact.
计算精度如何?How precise are the results?
加、减、乘按十进制精确计算,位数不限(例如 12345678901234567890.25 + 0.75 = 12,345,678,901,234,567,891);除法按你设置的“除法保留位数”(0–1000 位)四舍五入,除不尽时会标注“已四舍五入”。不使用双精度浮点数,所以不会出现 0.1 + 0.2 = 0.30000000000000004 这类误差。Addition, subtraction and multiplication are exact decimal arithmetic with no digit limit (e.g. 12345678901234567890.25 + 0.75 = 12,345,678,901,234,567,891); division is rounded half-up to the decimal places you choose (0–1,000) and marked "rounded" when it does not terminate. Double-precision floating point is not used, so errors like 0.1 + 0.2 = 0.30000000000000004 cannot occur.
「小数计算器」免费吗?需要注册吗?Is the Decimal Calculator free? Do I need an account?
「小数计算器」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Decimal Calculator is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.