prb-math icon indicating copy to clipboard operation
prb-math copied to clipboard

A `sign` function for signed types

Open Amxx opened this issue 1 year ago • 1 comments

Describe the feature you would like

I was wondering, whether [...] should offer a proper signum (sign might be too confusing due to cryptographic functions) function that returns the indication (-1, 0, or 1) of the sign of a 32-byte signed integer. Thoughts?

Additional context

The quote above is from @pcaversaccio

I was thinking that, if this is a math operation that is usefull to some users, it should probably be in PRBMath.

Amxx avatar Dec 13 '23 16:12 Amxx

Thanks for the feature request, @Amxx! I will consider it.

PaulRBerg avatar Dec 13 '23 16:12 PaulRBerg