nextafter¶
- nextafter(x1: array | int | float, x2: array | int | float, /) array¶
Returns the next representable floating-point value for each element
x1_iof the input arrayx1in the direction of the respective elementx2_iof the input arrayx2.- Parameters:
x1 (Union[array, int, float]) – first input array. Should have a real-valued floating-point data type.
x2 (Union[array, int, float]) – 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
At least one of
x1orx2must be an array.
Special cases
For real-valued floating-point operands,
If either
x1_iorx2_iisNaN, the result isNaN.If
x1_iis-0andx2_iis+0, the result is+0.If
x1_iis+0andx2_iis-0, the result is-0.
New in version 2024.12.