Example desired behavior:

Float32 -> Float32
Array{Int}-> Array{Float64}
Array{Float32} -> Array{Float32}
Complex{Int} -> Complex{Float32}
Complex{Float32} -> Complex{Float32}
Dual{Int} -> Dual{Int}
etc.

In short, I want to do convert some vector/algebra over the field of S to
be over the field of T with T<:FloatingPoint, or perhaps in other words,
for each element s of the field S I want to recreate a quantity with the
same structure but whose elements are `convert(T,s)`

It seems like this is the point of `float`, but not every package has
defined this. The other way that it seems I can accomplish this behavior is
by doing `one(Float32)*` but it seems like this behavior should be broken
out. It would seem clunky to do `typeof(1.0f0 * T)`  if I just wanted the
type.

A related question is: how could I get the T part of Dual{T}, Complex{T},
Array{Number{T}}, Quaternion{T}. One way is to keep V.parameters[1] until
there are no parameters, but does this seem sane?

Thanks

Reply via email to