# Creating Types in Julia

Hello,

I’m interested in using this library for some fixed point calculations. However, I’m interested in using complex numbers for my analysis (this is a communications systems application) and the library presents this problem for me:

This library defines an abstract type `FixedPoint{T <: Integer, f}` as a subtype of `Real` . The parameter `T` is the underlying machine representation and `f` is the number of fraction bits.

What are my options for having a fixed point complex type? Can I create some container type that has real and imaginary fixed point componets? Do I need to modify this library?

I’d very much like to avoid the situation where I have two vectors, one for the real part and another for the imaginary part.

Thanks,
Devin

1 Like

Nice.

``````using FixedPointNumbers

x = N0f8(0.8)
y = N0f8(0.8)
c = Complex(x, y)
println(c)
println(typeof(c))
``````

works like a charm:

``````0.8N0f8 + 0.8N0f8*im
Complex{N0f8}
``````
3 Likes

Thanks a lot for this, very helpful.