nextafter#
- class brainunit.math.nextafter(x, y, **kwargs)#
Return the next floating-point value after x towards y, element-wise.
- Parameters:
x (saiunit.Quantity |
Array|ndarray|bool|number|bool|int|float|complex) – Values to find the next representable value of.y (saiunit.Quantity |
Array|ndarray|bool|number|bool|int|float|complex) – The direction where to look for the next representable value of x. Ifx.shape != y.shape, they must be broadcastable to a common shape (which becomes the shape of the output).
- Returns:
out – The next representable values of x in the direction of y. This is a scalar if both x and y are scalars.
- Return type:
saiunit.Quantity |
Array
Examples
>>> import saiunit as u >>> a = [1.0, 2.0] * u.meter >>> b = [2.0, 1.0] * u.meter >>> u.math.nextafter(a, b)