-
Notifications
You must be signed in to change notification settings - Fork 52
Add accuracy document #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from 2 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
4f0cbff
Add accuracy doc
kgryte 8af77f5
Update index
kgryte 3844139
Fix capitalization
kgryte 40c87d4
Merge branch 'master' of https://github.com/pydata-apis/array-api int…
kgryte 298ef78
Merge branch 'master' of https://github.com/pydata-apis/array-api int…
kgryte 6632f93
Update function list
kgryte 6f2fc44
Update copy
kgryte 360a978
Add note regarding accuracy requirements
kgryte File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
.. _accuracy: | ||
|
||
# Accuracy | ||
|
||
## Arithmetic Operations | ||
|
||
The results of element-wise arithmetic operations | ||
|
||
- `+` | ||
- `-` | ||
- `*` | ||
- `/` | ||
- `%` | ||
|
||
including the corresponding element-wise array APIs defined in this standard | ||
|
||
- add | ||
- subtract | ||
- 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., ties rounded toward the nearest value with an even least significant bit). | ||
|
||
## Mathematical Functions | ||
|
||
This specification does **not** precisely define the behavior of the following functions | ||
|
||
- acos | ||
- acosh | ||
- asin | ||
- asinh | ||
- atan | ||
- atanh | ||
- cos | ||
- cosh | ||
- exp | ||
- log | ||
- sin | ||
- sinh | ||
- sqrt | ||
- tan | ||
- tanh | ||
|
||
except to require specific results for certain argument values that represent boundary cases of interest. | ||
|
||
For other argument values, these functions should compute approximations to the results of respective mathematical functions; however, this specification recognizes that array libraries may be constrained by underlying hardware and/or seek to optimize performance over absolute accuracy and, thus, allows some latitude in the choice of approximation algorithms. | ||
|
||
Although the specification leaves the choice of algorithms to the implementation, this specification recommends (but does not specify) that implementations use the approximation algorithms for IEEE 754-2019 arithmetic contained in [fdlibm](http://www.netlib.org/fdlibm), the freely distributable mathematical library from Sun Microsystems, or some other comparable IEEE 754-2019 compliant mathematical library. | ||
|
||
## Statistical Functions | ||
|
||
(TODO) | ||
|
||
## Linear Algebra | ||
|
||
(TODO) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,5 +12,6 @@ Design topics & constraints | |
array_ducktyping | ||
data_interchange | ||
missing_data | ||
accuracy | ||
portability | ||
C_API |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.