Add copysign
function to the standard
#593
Labels
API extension
Adds new functions or objects to the API.
copysign
function to the standard
#593
This RFC requests to include a new API in the array API specification for the purpose of returning a value with the magnitude of
x
but the sign ofy
.Overview
Based on array comparison data, the API is available in the majority of libraries in the PyData ecosystem.
The Array API specification does not currently include a convenient method of copying the sign from one value to another value via the IEEE 754 function
copysign
. This function is commonly used in the implementations of transcendental functions involving argument reductions.While this can be implemented in terms of
where
, doing so is overly cumbersome.Prior art
Proposal:
cc @kgryte
The text was updated successfully, but these errors were encountered: