Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gmlueck committed Jul 20, 2023
1 parent a50bd49 commit 2a2ae95
Showing 1 changed file with 49 additions and 49 deletions.
98 changes: 49 additions & 49 deletions adoc/chapters/programming_interface.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -21659,16 +21659,16 @@ a!
[source]
----
template<typename Ptr> (1)
float frexp(float x, Ptr iptr)
float frexp(float x, Ptr exp)

template<typename Ptr> (2)
double frexp(double x, Ptr iptr)
double frexp(double x, Ptr exp)

template<typename Ptr> (3)
half frexp(half x, Ptr iptr)
half frexp(half x, Ptr exp)

template<typename NonScalar, typename Ptr> (4)
/*return-type*/ frexp(NonScalar x, Ptr iptr)
/*return-type*/ frexp(NonScalar x, Ptr exp)
----
!====

Expand All @@ -21679,9 +21679,9 @@ _Constraints:_ Available only if [code]#Ptr# is [code]#multi_ptr# with
_writeable address spaces_ as defined above.

_Effects:_ Extracts the mantissa and exponent from [code]#x#. The mantissa is
a floating point number whose magnitude is in the interval [0.5, 1) or 0. The
a floating point number whose magnitude is in the interval +[0.5, 1)+ or 0. The
extracted mantissa and exponent are such that mantissa * 2^exp^ equals
[code]#x#. The exponent is written to [code]#iptr#.
[code]#x#. The exponent is written to [code]#exp#.

_Returns:_ The mantissa of [code]#x#.

Expand All @@ -21704,9 +21704,9 @@ _Constraints:_ Available only if all of the following conditions are met:

_Effects:_ Extracts the mantissa and exponent from each element of [code]#x#.
Each mantissa is a floating point number whose magnitude is in the interval
[0.5, 1) or 0. Each extracted mantissa and exponent are such that
+[0.5, 1)+ or 0. Each extracted mantissa and exponent are such that
mantissa * 2^exp^ equals [code]#x[i]#. The exponent of each element of
[code]#x# is written to [code]#iptr#.
[code]#x# is written to [code]#exp#.

_Returns:_ For each element of [code]#x#, the mantissa of [code]#x[i]#.

Expand Down Expand Up @@ -22181,8 +22181,8 @@ template<typename NonScalar1, typename NonScalar2> (4)

*Overloads (1) - (3):*

_Returns:_ The value [code]#x# if [code]#|x| > |y|#, [code]#y# if
[code]#|y| > |x|#, otherwise [code]#fmax(x, y)#.
_Returns:_ The value [code]#x# if |x| > |y|, [code]#y# if |y| > |x|, otherwise
[code]#fmax(x, y)#.

*Overload (4):*

Expand All @@ -22198,9 +22198,9 @@ _Constraints:_ Available only if all of the following conditions are met:
* The element type of [code]#NonScalar1# and [code]#NonScalar2# is
[code]#float#, [code]#double#, or [code]#half#.

_Returns:_ For each element of [code]#x# and [code]#y#, the value
[code]#x[i]# if [code]#|x[i]| > |y[i]|#, [code]#y[i]# if
[code]#|y[i]| > |x[i]|#, otherwise [code]#fmax(x[i], y[i])#.
_Returns:_ For each element of [code]#x# and [code]#y#, the value [code]#x[i]#
if |x[i]| > |y[i]|, [code]#y[i]# if |y[i]| > |x[i]|, otherwise
[code]#fmax(x[i], y[i])#.

The return type is [code]#NonScalar1# unless [code]#NonScalar1# is the
[code]#+__swizzled_vec__+# type, in which case the return type is the
Expand All @@ -22223,8 +22223,8 @@ template<typename NonScalar1, typename NonScalar2> (4)

*Overloads (1) - (3):*

_Returns:_ The value [code]#x# if [code]#|x| < |y|#, [code]#y# if
[code]#|y| < |x|#, otherwise [code]#fmin(x, y)#.
_Returns:_ The value [code]#x# if |x| < |y|, [code]#y# if |y| < |x|, otherwise
[code]#fmin(x, y)#.

*Overload (4):*

Expand All @@ -22240,9 +22240,9 @@ _Constraints:_ Available only if all of the following conditions are met:
* The element type of [code]#NonScalar1# and [code]#NonScalar2# is
[code]#float#, [code]#double#, or [code]#half#.

_Returns:_ For each element of [code]#x# and [code]#y#, the value
[code]#x[i]# if [code]#|x[i]| < |y[i]|#, [code]#y[i]# if
[code]#|y[i]| < |x[i]|#, otherwise [code]#fmin(x[i], y[i])#.
_Returns:_ For each element of [code]#x# and [code]#y#, the value [code]#x[i]#
if |x[i]| < |y[i]|, [code]#y[i]# if |y[i]| < |x[i]|, otherwise
[code]#fmin(x[i], y[i])#.

The return type is [code]#NonScalar1# unless [code]#NonScalar1# is the
[code]#+__swizzled_vec__+# type, in which case the return type is the
Expand Down Expand Up @@ -22605,7 +22605,7 @@ two integers closest to [code]#x/y#, [code]#k# shall be the even one. If
[code]#r# is zero, it is given the same sign as [code]#x#. This is the same
value that is returned by the [code]#remainder# function. The [code]#remquo#
function also calculates the lower seven bits of the integral quotient
[code]#x/y#, and gives that value the same sign as [code]#x/y#. It stores this
[code]#x/y# and gives that value the same sign as [code]#x/y#. It stores this
signed value to the object pointed to by [code]#quo#.

_Returns:_ The value [code]#r# defined above.
Expand Down Expand Up @@ -22636,7 +22636,7 @@ closest to [code]#x[i]/y[i]#, [code]#k# shall be the even one. If [code]#r# is
zero, it is given the same sign as [code]#x[i]#. This is the same value that
is returned by the [code]#remainder# function. The [code]#remquo# function
also calculates the lower seven bits of the integral quotient
[code]#x[i]/y[i]#, and gives that value the same sign as [code]#x[i]/y[i]#.
[code]#x[i]/y[i]# and gives that value the same sign as [code]#x[i]/y[i]#.
It stores these signed values to the object pointed to by [code]#quo#.

_Returns:_ The values of [code]#r# defined above.
Expand Down Expand Up @@ -24154,9 +24154,9 @@ template<typename GenInt>
_Constraints:_ Available only if [code]#GenInt# is a _generic integer type_ as
defined above.

_Returns:_ When the input is a scalar, returns [code]#|x|#. Otherwise,
returns [code]#|x[i]|# for each element of [code]#x#. The behavior is
undefined if the result cannot be represented by the return type.
_Returns:_ When the input is a scalar, returns |x|. Otherwise, returns |x[i]|
for each element of [code]#x#. The behavior is undefined if the result cannot
be represented by the return type.

The return type is [code]#GenInt# unless [code]#GenInt# is the
[code]#+__swizzled_vec__+# type, in which case the return type is the
Expand All @@ -24183,10 +24183,10 @@ _Constraints:_ Available only if all of the following conditions are met:
[code]#+__swizzled_vec__+# type, and both must have the same element type and
the same number of elements.

_Returns:_ When the inputs are scalars, returns [code]#|x - y|#.
Otherwise, returns [code]#|x[i] - y[i]|# for each element of [code]#x#
and [code]#y#. The subtraction is done without modulo overflow. The behavior
is undefined if the result cannot be represented by the return type.
_Returns:_ When the inputs are scalars, returns |x - y|. Otherwise, returns
|x[i] - y[i]| for each element of [code]#x# and [code]#y#. The subtraction is
done without modulo overflow. The behavior is undefined if the result cannot
be represented by the return type.

The return type is [code]#GenInt# unless [code]#GenInt# is the
[code]#+__swizzled_vec__+# type, in which case the return type is the
Expand Down Expand Up @@ -24651,7 +24651,7 @@ _Constraints:_ Available only if one of the following conditions is met:

* [code]#UInt8Bit1# and [code]#UInt8Bit2# are both [code]#uint8_t#;
* [code]#UInt8Bit1# and [code]#UInt8Bit2# are both [code]#marray# with element
type [cocde]#uint8_t# and the same number of elements; or
type [code]#uint8_t# and the same number of elements; or
* [code]#UInt8Bit1# and [code]#UInt8Bit2# are any combination of [code]#vec# or
the [code]#+__swizzled_vec__+# type with element type [code]#uint8_t# and the
same number of elements.
Expand Down Expand Up @@ -24681,8 +24681,8 @@ template<typename Int8Bit, typename UInt8Bit>
_Constraints:_ Available only if one of the following conditions is met:

* [code]#Int8Bit# is [code]#int8_t# and [code]#UInt8Bit# is [code]#uint8_t#;
* [code]#Int8Bit1 is [code]#marray# with element type [code]#int8_t# and
[code]#UInt8Bit# is [code]#marray# with element type [cocde]#uint8_t# and
* [code]#Int8Bit# is [code]#marray# with element type [code]#int8_t# and
[code]#UInt8Bit# is [code]#marray# with element type [code]#uint8_t# and
both have the same number of elements; or
* [code]#Int8Bit# is [code]#vec# or the [code]#+__swizzled_vec__+# type with
element type [code]#int8_t# and [code]#UInt8Bit# is [code]#vec# or the
Expand Down Expand Up @@ -24715,7 +24715,7 @@ _Constraints:_ Available only if one of the following conditions is met:

* [code]#UInt16Bit1# and [code]#UInt16Bit2# are both [code]#uint16_t#;
* [code]#UInt16Bit1# and [code]#UInt16Bit2# are both [code]#marray# with
element type [cocde]#uint16_t# and the same number of elements; or
element type [code]#uint16_t# and the same number of elements; or
* [code]#UInt16Bit1# and [code]#UInt16Bit2# are any combination of [code]#vec#
or the [code]#+__swizzled_vec__+# type with element type [code]#uint16_t# and
the same number of elements.
Expand Down Expand Up @@ -24746,8 +24746,8 @@ _Constraints:_ Available only if one of the following conditions is met:

* [code]#Int16Bit# is [code]#int16_t# and [code]#UInt16Bit# is
[code]#uint16_t#;
* [code]#Int16Bit1 is [code]#marray# with element type [code]#int16_t# and
[code]#UInt16Bit# is [code]#marray# with element type [cocde]#uint16_t# and
* [code]#Int16Bit# is [code]#marray# with element type [code]#int16_t# and
[code]#UInt16Bit# is [code]#marray# with element type [code]#uint16_t# and
both have the same number of elements; or
* [code]#Int16Bit# is [code]#vec# or the [code]#+__swizzled_vec__+# type with
element type [code]#int16_t# and [code]#UInt16Bit# is [code]#vec# or the
Expand Down Expand Up @@ -24780,7 +24780,7 @@ _Constraints:_ Available only if one of the following conditions is met:

* [code]#UInt32Bit1# and [code]#UInt32Bit2# are both [code]#uint32_t#;
* [code]#UInt32Bit1# and [code]#UInt32Bit2# are both [code]#marray# with
element type [cocde]#uint32_t# and the same number of elements; or
element type [code]#uint32_t# and the same number of elements; or
* [code]#UInt32Bit1# and [code]#UInt32Bit2# are any combination of [code]#vec#
or the [code]#+__swizzled_vec__+# type with element type [code]#uint32_t# and
the same number of elements.
Expand Down Expand Up @@ -24811,8 +24811,8 @@ _Constraints:_ Available only if one of the following conditions is met:

* [code]#Int32Bit# is [code]#int32_t# and [code]#UInt32Bit# is
[code]#uint32_t#;
* [code]#Int32Bit1 is [code]#marray# with element type [code]#int32_t# and
[code]#UInt32Bit# is [code]#marray# with element type [cocde]#uint32_t# and
* [code]#Int32Bit# is [code]#marray# with element type [code]#int32_t# and
[code]#UInt32Bit# is [code]#marray# with element type [code]#uint32_t# and
both have the same number of elements; or
* [code]#Int32Bit# is [code]#vec# or the [code]#+__swizzled_vec__+# type with
element type [code]#int32_t# and [code]#UInt32Bit# is [code]#vec# or the
Expand Down Expand Up @@ -24883,10 +24883,10 @@ _Constraints:_ Available only if all of the following conditions are met:
type and the same number of elements.

_Preconditions:_ If the inputs are signed scalars, the values of [code]#x# and
[code]#y# must be in the range latexmath:[[-2^{23}, 2^{23}-1\]]. If the inputs
are unsigned scalars, the values of [code]#x# and [code]#y# must be in the
range latexmath:[[0, 2^{24}-1\]]. If the inputs are not scalars, each element
of [code]#x# and [code]#y# must be in these ranges.
[code]#y# must be in the range [-2^23^, 2^23^-1]. If the inputs are unsigned
scalars, the values of [code]#x# and [code]#y# must be in the range
[0, 2^24^-1]. If the inputs are not scalars, each element of [code]#x# and
[code]#y# must be in these ranges.

_Returns:_ When the inputs are scalars, returns [code]#x * y + z#. Otherwise,
returns [code]#x[i] * y[i] + z[i]# for each element of [code]#x#, [code]#y#,
Expand Down Expand Up @@ -24926,10 +24926,10 @@ _Constraints:_ Available only if all of the following conditions are met:
the same number of elements.

_Preconditions:_ If the inputs are signed scalars, the values of [code]#x# and
[code]#y# must be in the range latexmath:[[-2^{23}, 2^{23}-1\]]. If the inputs
are unsigned scalars, the values of [code]#x# and [code]#y# must be in the
range latexmath:[[0, 2^{24}-1\]]. If the inputs are not scalars, each element
of [code]#x# and [code]#y# must be in these ranges.
[code]#y# must be in the range [-2^23^, 2^23^-1]. If the inputs are unsigned
scalars, the values of [code]#x# and [code]#y# must be in the range
[0, 2^24^-1]. If the inputs are not scalars, each element of [code]#x# and
[code]#y# must be in these ranges.

_Returns:_ When the inputs are scalars, returns [code]#x * y#. Otherwise,
returns [code]#x[i] * y[i]# for each element of [code]#x# and [code]#y#.
Expand Down Expand Up @@ -25001,8 +25001,8 @@ scalars, each element of [code]#minval# must be less than or equal to the
corresponding element of [code]#maxval#.

_Returns:_ When the inputs are scalars, returns
[code]#min(max(x, minval), maxval)#. Otherwise, returns
[code]#min(max(x[i], minval[i]), maxval[i])# for each element of [code]#x#,
[code]#fmin(fmax(x, minval), maxval)#. Otherwise, returns
[code]#fmin(fmax(x[i], minval[i]), maxval[i])# for each element of [code]#x#,
[code]#minval#, and [code]#maxval#.

The return type is [code]#GenFloat1# unless [code]#GenFloat1# is the
Expand All @@ -25018,7 +25018,7 @@ point type_ as defined above.
_Preconditions:_ The value of [code]#minval# must be less than or equal to the
value of [code]#maxval#.

_Returns:_ [code]#min(max(x[i], minval), maxval)# for each element of
_Returns:_ [code]#fmin(fmax(x[i], minval), maxval)# for each element of
[code]#x#.

The return type is [code]#NonScalar# unless [code]#NonScalar# is the
Expand Down Expand Up @@ -25313,7 +25313,7 @@ _Constraints:_ Available only if all of the following conditions are met:
_Preconditions:_ If the inputs are scalar, [code]#edge0# must be less than
[code]#edge1# and none of [code]#edge0#, [code]#edge1#, or [code]#x# may be
NaN. If the inputs are not scalar, each element of [code]#edge0# must be less
than the corresponding element of [code]#edge1# and no elements of
than the corresponding element of [code]#edge1# and no element of
[code]#edge0#, [code]#edge1#, or [code]#x# may be NaN.

_Returns:_ When the inputs are scalars, returns 0.0 if [code]#+x <= edge0+# and
Expand Down Expand Up @@ -25557,7 +25557,7 @@ _Constraints:_ Available only if [code]#GeoFloat# is a _generic geometric type_
as defined above.

_Returns:_ The length of vector [code]#p#, i.e.,
[code]#+sqrt(p[0]*p[0] + p[1]*p[1] + ...)+#.
[code]#+sqrt(pow(p[0],2) + pow(p[1],2) + ...)+#.

The return type is [code]#GeoFloat# if the input type is scalar. Otherwise,
the return type is [code]#GeoFloat::value_type#.
Expand Down

0 comments on commit 2a2ae95

Please sign in to comment.