Skip to content

Commit

Permalink
Tighten the spec
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelhkay committed Jan 1, 2025
1 parent 1c00c95 commit ff4bab3
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions specifications/xpath-functions-40/src/function-catalog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2386,10 +2386,12 @@ compare($N * $arg2, 0) eq compare($arg1, 0).</eg>
furthest from zero such that:</p>
<olist>
<item><p><code>quotient</code> is an exact multiple of ten to the power
of minus <code>$precision</code>, and</p></item>
of minus <code>$precision</code>;</p></item>
<item><p>the absolute value of <code>quotient</code>
multipled by <code>$divisor</code> is less than or equal to the absolute
value of <code>$value</code>.</p></item>
value of <code>$value</code>;</p></item>
<item><p>the sign of <code>quotient</code> is the same as the sign
of <code>op:numeric-divide($value, $divisor)</code>.</p></item>
</olist>
</item>
<item>
Expand All @@ -2403,6 +2405,10 @@ compare($N * $arg2, 0) eq compare($arg1, 0).</eg>
used in its place.</p>

</fos:rules>
<fos:errors>
<p>A dynamic error is raised <errorref class="AR" code="0001"/>
if <code>$divisor</code> is zero.</p>
</fos:errors

<fos:examples>
<fos:example>
Expand Down Expand Up @@ -2437,8 +2443,7 @@ compare($N * $arg2, 0) eq compare($arg1, 0).</eg>
<fos:test>
<fos:expression>divide-decimals(150_862, 7, -3)</fos:expression>
<fos:result>{ "quotient": 21_000, "remainder": 3_862 }</fos:result>
</fos:test>

</fos:test>
</fos:example>
</fos:examples>
<fos:changes>
Expand Down

0 comments on commit ff4bab3

Please sign in to comment.