A question posted in xbrl-dev, about consistency-assertion's @decimlas = "INF"

来源:互联网 发布:知乎客户端pc版 编辑:程序博客网 时间:2024/04/30 01:51

A question about formula consistency-assertion, how to handle "INF" precision?

<!--
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.
-->

Some companies use @decimals="INF" for every item, for example:
<c:A decimals="INF">1</c:A>
<c:B decimals="INF">3</c:B>
<c:PercentAB decimals="INF">0.3333</c:PercentAB> <<<< Input.PercentAB

In our formula linkbases, we use consistency assertion to check:
A / B = PercentAB
define formula's expression "A div B" to output derived fact:
<c:PercentAB>0.333333</c:PercentAB> <<<< Derived.PercentAB
we don't know the Input.PercentAB's @decimals value, so we can output two kind
of derived facts:
<c:PercentAB decimals="6">0.333333</c:PercentAB> <<<< Derived.PercentAB.1 Non
INF @decimals
<c:PercentAB decimals="INF">0.333333</c:PercentAB> <<<< Derived.PercentAB.2 INF
@decimals

A: If we output the @decimals gt the input @decimals, assertion NOT satisfied.
0.333333 (derived) <> 0.3333 (input)

B: if we output the @decimals eq "INF", assertion NOT satisfied:
0.333333 (derived) <> 0.3333 (input)

C: if we output the @decimals (3) le the input @decimals, assertion satisfied.
0.333 (derived) = 0.333 (input) // for select the lower precision.

So when we process this kind @decimals ("INF"). we calculate the lexical
precision, and select the lower precision to compare the two value.
0.3333 (derived) = 0.3333 (input) // lower decimals = 4

Please talk about, and get a more reasonable process model!
Thank you!

原创粉丝点击