Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 12bc99e

Browse files
author
array-api-bot
committed
Deploy: 4dccde5
1 parent b529544 commit 12bc99e

File tree

3 files changed

+36
-3
lines changed

3 files changed

+36
-3
lines changed

draft/_sources/design_topics/accuracy.rst.txt

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,20 @@ 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 a correctly rounded 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).
27+
28+
IEEE 754-2019 requires support for subnormal (a.k.a., denormal) numbers, which are useful for supporting gradual underflow. However, hardware support for subnormal numbers is not universal, and many platforms (e.g., accelerators) and compilers support toggling denormals-are-zero (DAZ) and/or flush-to-zero (FTZ) behavior to increase performance and to guard against timing attacks. Accordingly, conforming implementations may vary in their support for subnormal numbers.
2729

2830
Mathematical Functions
2931
----------------------
3032

33+
The results of the following functions
34+
35+
- reciprocal
36+
- sqrt
37+
38+
for real-valued floating-point operands must return a correctly rounded value according to IEEE 754-2019 and a supported rounding mode.
39+
3140
This specification does **not** precisely define the behavior of the following functions
3241

3342
- acos
@@ -41,10 +50,12 @@ This specification does **not** precisely define the behavior of the following f
4150
- cosh
4251
- exp
4352
- expm1
53+
- hypot
4454
- log
4555
- log1p
4656
- log2
4757
- log10
58+
- logaddexp
4859
- pow
4960
- sin
5061
- sinh
@@ -75,3 +86,8 @@ Linear Algebra
7586
--------------
7687

7788
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.
89+
90+
Operations Involving Complex Numbers
91+
------------------------------------
92+
93+
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.

draft/design_topics/accuracy.html

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,8 @@
285285
<li class="md-nav__item"><a href="#statistical-functions" class="md-nav__link">Statistical Functions</a>
286286
</li>
287287
<li class="md-nav__item"><a href="#linear-algebra" class="md-nav__link">Linear Algebra</a>
288+
</li>
289+
<li class="md-nav__item"><a href="#operations-involving-complex-numbers" class="md-nav__link">Operations Involving Complex Numbers</a>
288290
</li></ul>
289291
</nav>
290292
</li>
@@ -412,6 +414,8 @@
412414
<li class="md-nav__item"><a href="#statistical-functions" class="md-nav__link">Statistical Functions</a>
413415
</li>
414416
<li class="md-nav__item"><a href="#linear-algebra" class="md-nav__link">Linear Algebra</a>
417+
</li>
418+
<li class="md-nav__item"><a href="#operations-involving-complex-numbers" class="md-nav__link">Operations Involving Complex Numbers</a>
415419
</li></ul>
416420
</nav>
417421
</li>
@@ -446,10 +450,17 @@ <h2 id="arithmetic-operations">Arithmetic Operations<a class="headerlink" href="
446450
<li><p>multiply</p></li>
447451
<li><p>divide</p></li>
448452
</ul>
449-
<p>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 <code class="docutils literal notranslate"><span class="pre">roundTiesToEven</span></code> (i.e., round to nearest with ties rounded toward the nearest value with an even least significant bit).</p>
453+
<p>for real-valued floating-point operands must return a correctly rounded value according to IEEE 754-2019 and a supported rounding mode. By default, the rounding mode should be <code class="docutils literal notranslate"><span class="pre">roundTiesToEven</span></code> (i.e., round to nearest with ties rounded toward the nearest value with an even least significant bit).</p>
454+
<p>IEEE 754-2019 requires support for subnormal (a.k.a., denormal) numbers, which are useful for supporting gradual underflow. However, hardware support for subnormal numbers is not universal, and many platforms (e.g., accelerators) and compilers support toggling denormals-are-zero (DAZ) and/or flush-to-zero (FTZ) behavior to increase performance and to guard against timing attacks. Accordingly, conforming implementations may vary in their support for subnormal numbers.</p>
450455
</section>
451456
<section id="mathematical-functions">
452457
<h2 id="mathematical-functions">Mathematical Functions<a class="headerlink" href="#mathematical-functions" title="Link to this heading"></a></h2>
458+
<p>The results of the following functions</p>
459+
<ul class="simple">
460+
<li><p>reciprocal</p></li>
461+
<li><p>sqrt</p></li>
462+
</ul>
463+
<p>for real-valued floating-point operands must return a correctly rounded value according to IEEE 754-2019 and a supported rounding mode.</p>
453464
<p>This specification does <strong>not</strong> precisely define the behavior of the following functions</p>
454465
<ul class="simple">
455466
<li><p>acos</p></li>
@@ -463,10 +474,12 @@ <h2 id="mathematical-functions">Mathematical Functions<a class="headerlink" href
463474
<li><p>cosh</p></li>
464475
<li><p>exp</p></li>
465476
<li><p>expm1</p></li>
477+
<li><p>hypot</p></li>
466478
<li><p>log</p></li>
467479
<li><p>log1p</p></li>
468480
<li><p>log2</p></li>
469481
<li><p>log10</p></li>
482+
<li><p>logaddexp</p></li>
470483
<li><p>pow</p></li>
471484
<li><p>sin</p></li>
472485
<li><p>sinh</p></li>
@@ -497,6 +510,10 @@ <h2 id="statistical-functions">Statistical Functions<a class="headerlink" href="
497510
<h2 id="linear-algebra">Linear Algebra<a class="headerlink" href="#linear-algebra" title="Link to this heading"></a></h2>
498511
<p>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.</p>
499512
</section>
513+
<section id="operations-involving-complex-numbers">
514+
<h2 id="operations-involving-complex-numbers">Operations Involving Complex Numbers<a class="headerlink" href="#operations-involving-complex-numbers" title="Link to this heading"></a></h2>
515+
<p>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.</p>
516+
</section>
500517
</section>
501518

502519

draft/searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)