# Question: gr\_float\_to\_complex

**URL:** <https://www.ruby-forum.com/t/question-gr-float-to-complex/126775>\
**Category:** GNU Radio\
**Created:** [January 22, 2008, 4:08am UTC](https://www.ruby-forum.com/t/question-gr-float-to-complex/126775 "2008-01-22T04:08:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jasonallen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/5e9695/32.png) [@jasonallen](https://www.ruby-forum.com/u/jasonallen)\
**Post date:** [January 22, 2008, 4:08am UTC](https://www.ruby-forum.com/t/question-gr-float-to-complex/126775/1 "2008-01-22T04:08:47Z")

</div>

Hi again!

I have a question regarding the use of gr\_float\_to\_complex block.  
Unfortunately, Doxygen didn’t show the implementation of such a block.  
What  
I wanted to know is how gr\_float\_to\_complex implements float to complex  
conversion.

I could only guess that it treats the first number as the real part and  
the  
second number as the imaginary part and so on and so forth. Therefore, I  
could only suppose that gr\_float\_to\_complex treats input\_items like  
this:

input\_items[0] =\> real # 1  
input\_items[1] =\> imag # 1  
input\_items[2] =\> real # 2  
input\_items[3] =\> imag # 2

Is my assumption correct? And by the way, is there an “operation manual”  
for  
the different GNU Radio blocks aside from the one created by Doxygen? I  
just  
wanted to know how to use the blocks. Thanks!

---

<div class="post-metadata">

**Author:** ![jasonallen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/5e9695/32.png) [@jasonallen](https://www.ruby-forum.com/u/jasonallen)\
**Post date:** [January 22, 2008, 4:15am UTC](https://www.ruby-forum.com/t/question-gr-float-to-complex/126775/2 "2008-01-22T04:15:13Z")

</div>

On Jan 21, 2008 10:07 PM, Jason A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> could only suppose that gr\_float\_to\_complex treats input\_items like this:
> 
> input\_items[0] =\> real # 1  
> input\_items[1] =\> imag # 1  
> input\_items[2] =\> real # 2  
> input\_items[3] =\> imag # 2
> 
> Is my assumption correct? And by the way, is there an “operation manual” for  
> the different GNU Radio blocks aside from the one created by Doxygen? I just  
> wanted to know how to use the blocks. Thanks!

The beauty of open sourced code reveals:

```
http://gnuradio.org/trac/browser/gnuradio/trunk/gnuradio-core/src/lib/general/gr_float_to_complex.cc#L44

```

Most of the code in the trunk is pretty well documented. Feel free to  
take a look.

Brian
