diff --git a/OpenCL_Env.txt b/OpenCL_Env.txt index e4371d4f..8b2c2ff4 100644 --- a/OpenCL_Env.txt +++ b/OpenCL_Env.txt @@ -28,6 +28,11 @@ include::config/opencl.asciidoc[] // Formatting and links for API functions and enums. include::env/dictionary.asciidoc[] +// External Footnotes +include::env/footnotes.asciidoc[] + +<<< + include::copyrights.txt[] <<< diff --git a/env/footnotes.asciidoc b/env/footnotes.asciidoc new file mode 100644 index 00000000..ed98e6a1 --- /dev/null +++ b/env/footnotes.asciidoc @@ -0,0 +1,16 @@ +// Copyright 2023 The Khronos Group. This work is licensed under a +// Creative Commons Attribution 4.0 International License; see +// http://creativecommons.org/licenses/by/4.0/ + +// Please keep footnotes in alphabetical order! + +// Note: Follows the suggested syntax from: +// https://github.com/asciidoctor/asciidoctor-pdf/issues/1397 + +:fn-opfrem-opfmod: pass:n[ \ +The *OpFRem* and *OpFMod* instructions use cheap approximations of remainder, and the error can be large due to the discontinuity in *trunc*() and *floor*(). This can produce mathematically unexpected results in some cases, such as *OpFMod*(x,x) computing x rather than 0, and can also cause the result to have a different sign than the infinitely precise result. \ +] + +:fn-type-min: pass:n[ \ +Here `TYPE_MIN` and `TYPE_MIN_EXP` should be substituted by constants appropriate to the floating-point type under consideration, such as `FLT_MIN` and `FLT_MIN_EXP` for float. \ +] diff --git a/env/numerical_compliance.asciidoc b/env/numerical_compliance.asciidoc index a29bc8b6..3e614437 100644 --- a/env/numerical_compliance.asciidoc +++ b/env/numerical_compliance.asciidoc @@ -198,6 +198,16 @@ devices given as ULP values. | \<= 2.5 ulp | Correctly rounded +| *OpFRem*(x, y) +| Derived from x - y * *trunc*(x/y) footnote:opfrem-opfmod[{fn-opfrem-opfmod}] +| Derived from x - y * *trunc*(x/y) footnote:opfrem-opfmod[] +| Derived from x - y * *trunc*(x/y) footnote:opfrem-opfmod[] + +| *OpFMod*(x, y) +| Derived from x - y * *floor*(x/y) footnote:opfrem-opfmod[] +| Derived from x - y * *floor*(x/y) footnote:opfrem-opfmod[] +| Derived from x - y * *floor*(x/y) footnote:opfrem-opfmod[] + | *OpExtInst* *acos* | \<= 4 ulp | \<= 4 ulp @@ -1782,6 +1792,4 @@ representable numbers in the range 0 < x < TYPE_MIN and -TYPE_MIN < x < -0. They do not include {plusmn}0. A non-zero number is said to be sub-normal before rounding if, after normalization, its radix-2 exponent is less than (TYPE_MIN_EXP - 1). -footnote:[Here `TYPE_MIN` and `TYPE_MIN_EXP` should be substituted by -constants appropriate to the floating-point type under consideration, such -as `FLT_MIN` and `FLT_MIN_EXP` for float.] +footnote:[{fn-type-min}]