Skip to content
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

add unsafe math optimization error bounds for the non-derived atan2 #1073

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions OpenCL_C.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11688,6 +11688,7 @@ requires>> support for OpenCL C 2.0 or newer.
| Derived implementations may implement as *atan*(_y_ / _x_) for _x_ > 0,
*atan*(_y_ / _x_) + `M_PI_F` for _x_ < 0 and _y_ > 0, and
*atan*(_y_ / _x_) - `M_PI_F` for _x_ < 0 and _y_ < 0.
For non-derived implementations, the error is {leq} 8192 ulp.

| *atan2pi*(_y_, _x_)
| Derived implementations may implement as *atan2*(_y_, _x_) * `M_1_PI_F`.
Expand Down
1 change: 1 addition & 0 deletions cxx/numerical_compliance/relative_error_as_ulps.txt
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,7 @@ The reference value used to compute the ULP value of an arithmetic operation is

| atan2(y, x)
| Implemented as atan(y/x) for x > 0, atan(y/x) + M_PI_F for x < 0 and y > 0 and atan(y/x) - M_PI_F for x < 0 and y < 0.
For non-derived implementations, the error is \<= 8192 ulp.

| atanpi(x)
| Implemented as atan(x) * M_1_PI_F.
Expand Down
1 change: 1 addition & 0 deletions env/numerical_compliance.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -1454,6 +1454,7 @@ profile.
| Derived implementations may implement as *atan*(_y_ / _x_) for _x_ > 0,
*atan*(_y_ / _x_) + `M_PI_F` for _x_ < 0 and _y_ > 0, and
*atan*(_y_ / _x_) - `M_PI_F` for _x_ < 0 and _y_ < 0.
For non-derived implementations, the error is {leq} 8192 ulp.

| *OpExtInst* *atan2pi*
| Derived implementations may implement as *atan2*(_y_, _x_) * `M_1_PI_F`.
Expand Down