Skip to content

Commit cb0f4f4

Browse files
bashbaugaharon-abramson
authored andcommitted
clarify unsafe math accuracy requirements for the embedded profile (#1318)
Clarifies the unsafe math accuracy requirements for divide, reciprocal, exp, and exp2 for the embedded profile. The previous wording was ambiguous, and could have been interpreted to mean that the embedded profile had stricter accuracy requirements than the full profile.
1 parent 859b53b commit cb0f4f4

2 files changed

Lines changed: 12 additions & 8 deletions

File tree

OpenCL_C.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15950,11 +15950,13 @@ requires>> support for OpenCL C 2.0 or newer.
1595015950

1595115951
| 1.0 / _x_
1595215952
| {leq} 2.5 ulp for _x_ in the domain of 2^-126^ to 2^126^ for the full
15953-
profile, and {leq} 3 ulp for the embedded profile.
15953+
profile, and {leq} 3 ulp for _x_ in the domain of 2^-126^ to 2^126^ for
15954+
the embedded profile.
1595415955

1595515956
| _x_ / _y_
1595615957
| {leq} 2.5 ulp for _x_ in the domain of 2^-62^ to 2^62^ and _y_ in the
15957-
domain of 2^-62^ to 2^62^ for the full profile, and {leq} 3 ulp for
15958+
domain of 2^-62^ to 2^62^ for the full profile, and {leq} 3 ulp for _x_ in
15959+
the domain of 2^-62^ to 2^62^ and _y_ in the domain of 2^-62^ to 2^62^ for
1595815960
the embedded profile.
1595915961

1596015962
| *acos*(_x_)
@@ -16022,11 +16024,11 @@ requires>> support for OpenCL C 2.0 or newer.
1602216024

1602316025
| *exp*(_x_)
1602416026
| {leq} 3 + *floor*(*fabs*(2 * _x_)) ulp for the full profile, and {leq}
16025-
4 ulp for the embedded profile.
16027+
4 + *floor*(*fabs*(2 * _x_)) ulp for the embedded profile.
1602616028

1602716029
| *exp2*(_x_)
1602816030
| {leq} 3 + *floor*(*fabs*(2 * _x_)) ulp for the full profile, and {leq}
16029-
4 ulp for the embedded profile.
16031+
4 + *floor*(*fabs*(2 * _x_)) ulp for the embedded profile.
1603016032

1603116033
| *exp10*(_x_)
1603216034
| Derived implementations may implement as *exp2*(_x_ * *log2*(10)).

env/numerical_compliance.asciidoc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1407,11 +1407,13 @@ profile.
14071407

14081408
| *OpFDiv* for 1.0 / _x_
14091409
| {leq} 2.5 ulp for _x_ in the domain of 2^-126^ to 2^126^ for the full
1410-
profile, and {leq} 3 ulp for the embedded profile.
1410+
profile, and {leq} 3 ulp for _x_ in the domain of 2^-126^ to 2^126^ for
1411+
the embedded profile.
14111412

14121413
| *OpFDiv* for _x_ / _y_
14131414
| {leq} 2.5 ulp for _x_ in the domain of 2^-62^ to 2^62^ and _y_ in the
1414-
domain of 2^-62^ to 2^62^ for the full profile, and {leq} 3 ulp for
1415+
domain of 2^-62^ to 2^62^ for the full profile, and {leq} 3 ulp for _x_ in
1416+
the domain of 2^-62^ to 2^62^ and _y_ in the domain of 2^-62^ to 2^62^ for
14151417
the embedded profile.
14161418

14171419
| *OpExtInst* *acos*
@@ -1479,11 +1481,11 @@ profile.
14791481

14801482
| *OpExtInst* *exp*
14811483
| {leq} 3 + *floor*(*fabs*(2 * _x_)) ulp for the full profile, and {leq}
1482-
4 ulp for the embedded profile.
1484+
4 + *floor*(*fabs*(2 * _x_)) ulp for the embedded profile.
14831485

14841486
| *OpExtInst* *exp2*
14851487
| {leq} 3 + *floor*(*fabs*(2 * _x_)) ulp for the full profile, and {leq}
1486-
4 ulp for the embedded profile.
1488+
4 + *floor*(*fabs*(2 * _x_)) ulp for the embedded profile.
14871489

14881490
| *OpExtInst* *exp10*
14891491
| Derived implementations may implement as *exp2*(_x_ * *log2*(10)).

0 commit comments

Comments
 (0)