# Extract the sign bit from a zero float?

**URL:** <https://forum.kx.com/t/extract-the-sign-bit-from-a-zero-float/10181>\
**Category:** Community Support\
**Tags:** kdb-and-q\
**Created:** [July 25, 2015, 4:55pm UTC](https://forum.kx.com/t/extract-the-sign-bit-from-a-zero-float/10181 "2015-07-25T16:55:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DonovanHide](https://avatars.discourse-cdn.com/v4/letter/d/e36b37/32.png) [@DonovanHide](https://forum.kx.com/u/DonovanHide)\
**Post date:** [July 25, 2015, 4:55pm UTC](https://forum.kx.com/t/extract-the-sign-bit-from-a-zero-float/10181/1 "2015-07-25T16:55:00Z")

</div>

Is it possible in q to extract the sign bit from a zero float? signum returns 0 for both 0 and -0.

Thanks!

---

<div class="post-metadata">

**Author:** ![joshmyzie2](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@joshmyzie2](https://forum.kx.com/u/joshmyzie2)\
**Post date:** [July 26, 2015, 3:03am UTC](https://forum.kx.com/t/extract-the-sign-bit-from-a-zero-float/10181/2 "2015-07-26T03:03:00Z")

</div>

Yes, see the signed zero wiki page [1] for more info on its properties.q)signum%[1;0f]1iq)signum%[1;-0f]-1i[1] [https://en.wikipedia.org/wiki/Signed\_zeroJoshOn](https://en.wikipedia.org/wiki/Signed%5C_zeroJoshOn) 25 July 2015 15:55 UTC, Donovan Hide wrote:\> Is it possible in q to extract the sign bit from a zero float? signum \> returns 0 for both 0 and -0.\>\> Thanks!

---

<div class="post-metadata">

**Author:** ![DonovanHide](https://avatars.discourse-cdn.com/v4/letter/d/e36b37/32.png) [@DonovanHide](https://forum.kx.com/u/DonovanHide)\
**Post date:** [July 26, 2015, 11:06am UTC](https://forum.kx.com/t/extract-the-sign-bit-from-a-zero-float/10181/3 "2015-07-26T11:06:00Z")

</div>

Brilliant, thanks Josh!
