code: def nextafter(
      x1: Union[ivy.Array, ivy.NativeArray],
      x2: Union[ivy.Array, ivy.NativeArray],
      /,
      *,
      out: Optional[ivy.Array] = None,
  ) -> bool:
      """Return the next floating-point value after x1 towards x2, element-wise.
  
      Parameters
      ----------
      x1
          First input array.
      x2
          Second input array.
      out
          Alternate output array in which to place the result.
          The default is None.
  
      Returns
      -------
      ret
          The next representable values of x1 in the direction of x2.
  
      Examples
      --------
      >>> x1 = ivy.array([1.0e-50, 2.0e+50])
      >>> x2 = ivy.array([2.0, 1.0])
      >>> ivy.nextafter(x1, x2)
      ivy.array([1.4013e-45., 3.4028e+38])
      """
      return ivy.current_backend(x1, x2).nextafter(x1, x2, out=out)
  
imports: from typing import Optional, Union, Tuple, List, Sequence
  from numbers import Number
  import ivy
  from ivy.func_wrapper import handle_out_argument, to_native_arrays_and_back, handle_nestable, handle_partial_mixed_function, handle_array_like_without_promotion, inputs_to_ivy_arrays, handle_array_function, infer_dtype, handle_device, handle_backend_invalid
  from ivy.utils.exceptions import handle_exceptions
label_desc: Use image node_id 16 for calling a global function with example usage: nextafter() and returns: ivy