XBRL规范中说明,可以有@decimals + Item的值 计算的相应的 @precision值。
而在验证计算链接库时,都应该按照precision调整(Round)后进行比较,判断计算链接库是否平衡。
( If, on a numeric item, the decimals attribute is present rather than the precision attribute, then a consuming application MUST infer the precision of that numeric fact if it is to be used in calculations or searches for duplicates in XBRL instances. )
但是今天碰到这样的问题。
<A decimals="2">0.0012</A>
根据规范推导 precision = X.decimas + Y.小数点前的有效位数() + E.指数。
Y = (
if there are non-zero digits to the left of the decimal point or implied decimal point if absent then the number of digits excluding any leading zeros to the left of the decimal point (or implied decimal point if absent) in the lexical representation of the numerical fact
otherwise if there are non-zero digits to the right of the decimal point, the negative of the number of zeros between the decimal point and the first non-zero digit in the lexical representation of the numerical fact
)
得到 @precision=0 (2 + -2) ,而当@precision=0时,数据是不可比的。
Precision | Example of lexical representation in the XBRL instance | Read as (after omitting or zeroing any spuri-ous digits) | Known to be GE | Known to be LT |
INF | 476.334 | 476.334 | 476.334 | 476.33400000000…1 |
3 | 205 | 205e0 | 204.5 | 205.5 |
4 | 2002000 | 2002e3 | 2001500 | 2002500 |
4 | -2002000 | -2002e3 | -2002500 | 2001500 |
2 | 2012 | 20e2 | 1950 | 2050 |
2 | 2000 | 20e2 | 1950 | 2050 |
1 | 99 | 9e1 | 85 | 95 |
0 | 1234 | 1234 | unknown | unknown |
但是我们会说,A明明是0嘛(根据小数位数判断),为什么有变成0.0012了呢。且不可比。
这似乎和实际不是很符合。不好理解。