# relational operators on floats not working?

**URL:** <https://forum.kx.com/t/relational-operators-on-floats-not-working/6469>\
**Category:** Community Support\
**Tags:** kdb-and-q\
**Created:** [January 20, 2010, 8:59pm UTC](https://forum.kx.com/t/relational-operators-on-floats-not-working/6469 "2010-01-20T20:59:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gabriel\_ricardo](https://avatars.discourse-cdn.com/v4/letter/g/8e7dd6/32.png) [@gabriel\_ricardo](https://forum.kx.com/u/gabriel_ricardo)\
**Post date:** [January 20, 2010, 8:59pm UTC](https://forum.kx.com/t/relational-operators-on-floats-not-working/6469/1 "2010-01-20T20:59:00Z")

</div>

I get different results when using relational operators to compare ifsome number is less than 0.01Check this out:q)(abs(33.01-33f))0.01q)0.01\<0.010bq)x:(abs(33.01-33f))q)show x0.01q)x\<0.011bWhat am I missing here? This seems broken. I’ve run this on the freekdb+ 32-bit 2.6 2010.01.05 as well as the linux 64-bit 2.52009.08.26. Same result.Anyone have any ideas?

---

<div class="post-metadata">

**Author:** ![charlie1](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@charlie1](https://forum.kx.com/u/charlie1)\
**Post date:** [January 21, 2010, 7:08am UTC](https://forum.kx.com/t/relational-operators-on-floats-not-working/6469/2 "2010-01-21T07:08:00Z")

</div>

if you switch up the precision on printing you’ll see why

q)\P 0  
q)(abs(33.01-33f))  
0.0099999999999980105
