@@ -372,6 +372,13 @@ def multiply(x1, x2, /):
372372 return elemwise (nxp .multiply , x1 , x2 , dtype = result_type (x1 , x2 ))
373373
374374
375+ def nextafter (x1 , x2 , / ):
376+ x1 , x2 = _promote_scalars (x1 , x2 , "nextafter" )
377+ if x1 .dtype not in _real_floating_dtypes or x2 .dtype not in _real_floating_dtypes :
378+ raise TypeError ("Only real floating-point dtypes are allowed in nextafter" )
379+ return elemwise (nxp .nextafter , x1 , x2 , dtype = x1 .dtype )
380+
381+
375382def negative (x , / ):
376383 if x .dtype not in _numeric_dtypes :
377384 raise TypeError ("Only numeric dtypes are allowed in negative" )
@@ -406,6 +413,12 @@ def real(x, /):
406413 return elemwise (nxp .real , x , dtype = dtype )
407414
408415
416+ def reciprocal (x , / ):
417+ if x .dtype not in _floating_dtypes :
418+ raise TypeError ("Only floating-point dtypes are allowed in reciprocal" )
419+ return elemwise (nxp .reciprocal , x , dtype = x .dtype )
420+
421+
409422def remainder (x1 , x2 , / ):
410423 x1 , x2 = _promote_scalars (x1 , x2 , "remainder" )
411424 if x1 .dtype not in _real_numeric_dtypes or x2 .dtype not in _real_numeric_dtypes :
0 commit comments