XBRL Formula和XBRL规范差异引起的一个技术陷阱,在什么地方提到过,忘了

XBRL 规范中事实数据 Item有@decimals属性,在计算链接库处理,是根据@decimals属性Rounding后,在计算的;

而Formula处理时,是不考虑数据的@decimals属性的。考虑一种情况。

A = B + C

A @deicmals=0 100.09

B @decimals=0 60.00

C @decimals=0 40.00

计算链接库,验证是通过。但是Formula验证,如何直接使用等号,验证的话 100.09 != 60+ 40

如果考虑: A - (B + C) <=   10 ^ (-1 * A.decimals)  / 2 

100.09 - 100 <= 10 ^ (0) /2 <= 0.5

因此在写Formula断言时,如果使用值断言是需要考虑比较值的小数位数;如果使用一致性断言,某些情况下,可以自动按照目标fact Rounding(忘了)后比较。


If the two facts have data types that are numeric, and their data types are not xbrli:fractionItemType or derived from the xbrli:fractionItemType, and the acceptance radius is not defined, then they are only consistent if the numeric values A and B are x-equal where A is obtained by rounding the value of the first fact to N significant figures and B is obtained by rounding the value of the second fact to N significant figures noting that N is the lower of the specified or inferred precision for the first fact and the specified or inferred precision for the second fact.

为什么不按照最小的@decimals属性来判断呢? XBRL规范推荐使用@decimals属性。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值