Skip to content

Commit 2296a03

Browse files
committed
docs: require that sqrt be correctly rounded in accordance with IEEE 754
Closes: data-apis#826
1 parent d12a5e3 commit 2296a03

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

spec/draft/design_topics/accuracy.rst

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,18 @@ including the corresponding element-wise array APIs defined in this standard
2323
- multiply
2424
- divide
2525

26-
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).
26+
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).
2727

2828
Mathematical Functions
2929
----------------------
3030

31+
The results of the following functions
32+
33+
- reciprocal
34+
- sqrt
35+
36+
for real-valued floating-point operands must return the nearest representable value according to IEEE 754-2019 and a supported rounding mode.
37+
3138
This specification does **not** precisely define the behavior of the following functions
3239

3340
- acos
@@ -41,10 +48,12 @@ This specification does **not** precisely define the behavior of the following f
4148
- cosh
4249
- exp
4350
- expm1
51+
- hypot
4452
- log
4553
- log1p
4654
- log2
4755
- log10
56+
- logaddexp
4857
- pow
4958
- sin
5059
- sinh
@@ -75,3 +84,8 @@ Linear Algebra
7584
--------------
7685

7786
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.
87+
88+
Operations Involving Complex Numbers
89+
------------------------------------
90+
91+
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 commit comments

Comments
 (0)