@@ -372,6 +372,13 @@ def multiply(x1, x2, /):
372
372
return elemwise (nxp .multiply , x1 , x2 , dtype = result_type (x1 , x2 ))
373
373
374
374
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
+
375
382
def negative (x , / ):
376
383
if x .dtype not in _numeric_dtypes :
377
384
raise TypeError ("Only numeric dtypes are allowed in negative" )
@@ -406,6 +413,12 @@ def real(x, /):
406
413
return elemwise (nxp .real , x , dtype = dtype )
407
414
408
415
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
+
409
422
def remainder (x1 , x2 , / ):
410
423
x1 , x2 = _promote_scalars (x1 , x2 , "remainder" )
411
424
if x1 .dtype not in _real_numeric_dtypes or x2 .dtype not in _real_numeric_dtypes :
0 commit comments