nextafter¶
- nextafter(x1: array, x2: array, /) array ¶
Returns the next representable floating-point value for each element
x1_i
of the input arrayx1
in the direction of the respective elementx2_i
of the input arrayx2
.- Parameters:
x1 (array) – first input array. Should have a real-valued floating-point data type.
x2 (array) – second input array. Must be compatible with
x1
(see Broadcasting). Should have the same data type asx1
.
- Returns:
out (array) – an array containing the element-wise results. The returned array must have the same data type as
x1
.
Notes
Special cases
For real-valued floating-point operands,
If either
x1_i
orx2_i
isNaN
, the result isNaN
.If
x1_i
is-0
andx2_i
is+0
, the result is+0
.If
x1_i
is+0
andx2_i
is-0
, the result is-0
.