# Include \`math.sign\`

**URL:** <https://discuss.python.org/t/include-math-sign/45404>\
**Category:** Ideas\
**Created:** [February 8, 2024, 6:51pm UTC](https://discuss.python.org/t/include-math-sign/45404 "2024-02-08T18:51:50Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![oscarbenjamin](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/oscarbenjamin/32/1209_2.png) [@oscarbenjamin](https://discuss.python.org/u/oscarbenjamin)\
**Post date:** [February 8, 2024, 9:44pm UTC](https://discuss.python.org/t/include-math-sign/45404/13 "2024-02-08T21:44:27Z")

</div>

> [@bschubert](#):
>
> FWIW, Rust’s analog calls this [`cis`](https://docs.rs/num/latest/num/complex/struct.Complex.html#method.cis), not `sign`/`signum`.

These are not equivalent because `cis(pi/2) = i` whereas `sign(pi/2) = 1`.

On the subject of `sign` for complex numbers see recent discussion on the numpy mailing list about [changing the convention](https://mail.python.org/archives/list/numpy-discussion@python.org/thread/HHAHGWGFCI6CCZ6EPWMI7HQCDHGD4T5D/) used there.

Generally the idea when extending to the complex case is that `abs(z)*sign(z) == z` so `sign(z)` retains the information discarded by `abs(z)`.

---

_[View the full topic](https://discuss.python.org/t/include-math-sign/45404)._
