Skip to content

Commit

Permalink
docs: require that sqrt be correctly rounded in accordance with IEE…
Browse files Browse the repository at this point in the history
…E 754

Closes: data-apis#826
  • Loading branch information
kgryte committed Jan 9, 2025
1 parent d12a5e3 commit 2296a03
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion spec/draft/design_topics/accuracy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,18 @@ including the corresponding element-wise array APIs defined in this standard
- multiply
- divide

for floating-point operands must return the nearest representable value according to IEEE 754-2019 and a supported rounding mode. By default, the rounding mode should be ``roundTiesToEven`` (i.e., round to nearest with ties rounded toward the nearest value with an even least significant bit).
for real-valued floating-point operands must return the nearest representable value according to IEEE 754-2019 and a supported rounding mode. By default, the rounding mode should be ``roundTiesToEven`` (i.e., round to nearest with ties rounded toward the nearest value with an even least significant bit).

Mathematical Functions
----------------------

The results of the following functions

- reciprocal
- sqrt

for real-valued floating-point operands must return the nearest representable value according to IEEE 754-2019 and a supported rounding mode.

This specification does **not** precisely define the behavior of the following functions

- acos
Expand All @@ -41,10 +48,12 @@ This specification does **not** precisely define the behavior of the following f
- cosh
- exp
- expm1
- hypot
- log
- log1p
- log2
- log10
- logaddexp
- pow
- sin
- sinh
Expand Down Expand Up @@ -75,3 +84,8 @@ Linear Algebra
--------------

This specification does not specify accuracy requirements for linear algebra functions; however, this specification does expect that a conforming implementation of the array API standard will make a best-effort attempt to ensure that its implementations are theoretically sound and numerically robust.

Operations Involving Complex Numbers
------------------------------------

This specification does not specify accuracy requirements for arithmetic or functional operations involving complex-valued floating-point operands; however, this specification does expect that a conforming implementation of the array API standard will make a best-effort attempt to ensure that its implementations are theoretically sound and numerically robust.

0 comments on commit 2296a03

Please sign in to comment.