# No automatic int -&gt; float conversion?

**URL:** <https://forum.kx.com/t/no-automatic-int-gt-float-conversion/8378>\
**Category:** Community Support\
**Tags:** kdb-and-q\
**Created:** [September 15, 2013, 9:49am UTC](https://forum.kx.com/t/no-automatic-int-gt-float-conversion/8378 "2013-09-15T09:49:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![macdev21](https://avatars.discourse-cdn.com/v4/letter/m/a87d85/32.png) [@macdev21](https://forum.kx.com/u/macdev21)\
**Post date:** [September 15, 2013, 9:49am UTC](https://forum.kx.com/t/no-automatic-int-gt-float-conversion/8378/1 "2013-09-15T09:49:00Z")

</div>

I am using kdb 2.7.  
The table goes like t:( a:`float$();b:`int$())

Now if I try to do `t insert (a:12;b:11) this fails but a:12.0 works. This is kind of painful for me. Is there a way to have automatic int to float conversion?&nbsp;

---

<div class="post-metadata">

**Author:** ![manni\_patel](https://avatars.discourse-cdn.com/v4/letter/m/958977/32.png) [@manni\_patel](https://forum.kx.com/u/manni_patel)\
**Post date:** [September 15, 2013, 1:14pm UTC](https://forum.kx.com/t/no-automatic-int-gt-float-conversion/8378/2 "2013-09-15T13:14:00Z")

</div>

You don’t need the assignment on the right hand side – just the list that defines the row:\<o:p\>\</o:p\>

\<o:p\> \</o:p\>

`t insert (12f;11)\<o:p\>\</o:p\>

\<o:p\> \</o:p\>

Note the f which makes 12 a float. \<o:p\>\</o:p\>

\<o:p\> \</o:p\>

\<o:p\> \</o:p\>

**From:** [personal-kdbplus@googlegroups.com](mailto:personal-kdbplus@googlegroups.com) [[mailto:personal-kdbplus@googlegroups.com](mailto:personal-kdbplus@googlegroups.com)] **On Behalf Of** kdb newb  
**Sent:** 15 September 2013 09:50  
**To:** [personal-kdbplus@googlegroups.com](mailto:personal-kdbplus@googlegroups.com)  
**Subject:** [personal kdb+] No automatic int -\> float conversion?\<o:p\>\</o:p\>

\<o:p\> \</o:p\>

I am using kdb 2.7.\<o:p\>\</o:p\>

The table goes like t:( a:`float$();b:`int$())\<o:p\>\</o:p\>

\<o:p\> \</o:p\>

Now if I try to do `t insert (a:12;b:11) this fails but a:12.0 works. This is kind of painful for me. Is there a way to have automatic int to float conversion?&nbsp;\<o:p\>\</o:p\>

–  
Submitted via Google Groups
