# \_\_float\_as\_int and \_\_int\_as\_float

**URL:** <https://forums.developer.nvidia.com/t/float-as-int-and-int-as-float/7991>\
**Category:** CUDA Programming and Performance\
**Created:** [February 25, 2009, 1:53pm UTC](https://forums.developer.nvidia.com/t/float-as-int-and-int-as-float/7991 "2009-02-25T13:53:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MxAddict](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@MxAddict](https://forums.developer.nvidia.com/u/MxAddict)\
**Post date:** [February 25, 2009, 1:53pm UTC](https://forums.developer.nvidia.com/t/float-as-int-and-int-as-float/7991/1 "2009-02-25T13:53:52Z")

</div>

Hi

Do \_\_float\_as\_int and \_\_int\_as\_float instructions have any cost (in GPU cycles) or they just simply ‘rename’ registers to compiller  
and actually do not generate any code that is executed on GPU ?

---

<div class="post-metadata">

**Author:** ![SPWorley](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@SPWorley](https://forums.developer.nvidia.com/u/SPWorley)\
**Post date:** [February 25, 2009, 2:03pm UTC](https://forums.developer.nvidia.com/t/float-as-int-and-int-as-float/7991/2 "2009-02-25T14:03:06Z")

</div>

When I looked via decubin, it was indeed costless conversion. I only checked float\_as\_int but I’m sure it’d be true the other way as well.
