---
title: 数量
id: quantity
date: 2018-08-07
full_link:
short_description: >
  使用 SI 后缀的小数或大数的整数表示。

aka: 
tags:
- core-object
---
<!--
---
title: Quantity
id: quantity
date: 2018-08-07
full_link:
short_description: >
  A whole-number representation of small or large numbers using SI suffixes.

aka: 
tags:
- core-object
---
-->

<!--more-->

数量是使用紧凑的整数表示法的小数或大数的表示，并带有国际计量单位制（SI）后缀。
小数用 milli 单位表示，而大数用 kilo、mega 或 giga 单位表示。

例如，数字 `1.5` 表示为`1500m`，
而数字`1000`表示为`1k`，`1000000`表示为`1M`。 
您还可以指定二进制表示法后缀; 数字 2048 可以写成`2Ki`。

公认的十进制（10的幂）单位是 `m`（milli）、`k`（kilo，
有意小写）、`M`（mega），`G`（giga）、`T`（terra）、`P`（peta）、
`E`（exa）。

公认的二进制（2的幂）单位是 `Ki` (kibi)、 `Mi` (mebi)、`Gi` (gibi)、
`Ti` (tebi)、 `Pi` (pebi)、 `Ei` (exbi)。

<!--
Quantities are representations of small or large numbers using a compact,
whole-number notation with SI suffixes.  Fractional numbers are represented
using milli units, while large numbers can be represented using kilo,
mega, or giga units.

For instance, the number `1.5` is represented as `1500m`, while the number `1000`
can be represented as `1k`, and `1000000` as `1M`. You can also specify
binary-notation suffixes; the number 2048 can be written as `2Ki`.

The accepted decimal (power-of-10) units are `m` (milli), `k` (kilo,
intentionally lowercase), `M` (mega), `G` (giga), `T` (terra), `P` (peta),
`E` (exa).

The accepted binary (power-of-2) units are `Ki` (kibi), `Mi` (mebi), `Gi` (gibi),
`Ti` (tebi), `Pi` (pebi), `Ei` (exbi).
-->
