# Is typeof(x::Unitful).parameters\[1\] reliable?

**URL:** <https://discourse.julialang.org/t/is-typeof-x-unitful-parameters-1-reliable/70185>\
**Category:** General Usage\
**Tags:** unitful\
**Created:** [October 22, 2021, 12:40am UTC](https://discourse.julialang.org/t/is-typeof-x-unitful-parameters-1-reliable/70185 "2021-10-22T00:40:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [October 22, 2021, 12:40am UTC](https://discourse.julialang.org/t/is-typeof-x-unitful-parameters-1-reliable/70185/1 "2021-10-22T00:40:51Z")

</div>

Is this a reliable (stable) way to extract the type of float of a value of type Unitful, or is this an implementation detail? Is there a standard way to do so?

```julia
julia> using Unitful

julia> x = 1.0u"nm"
1.0 nm

julia> typeof(x).parameters[1]
Float64

```

---

<div class="post-metadata">

**Author:** ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Post date:** [October 22, 2021, 1:04am UTC](https://discourse.julialang.org/t/is-typeof-x-unitful-parameters-1-reliable/70185/2 "2021-10-22T01:04:44Z")

</div>

[https://painterqubits.github.io/Unitful.jl/stable/manipulations/#Unitful.ustrip](https://painterqubits.github.io/Unitful.jl/stable/manipulations/#Unitful.ustrip)
