You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(I posted this in an old pull request #103 and realized nobody would ever see it there)
I've been struggling with this all day and finally got it to work. I had to do a lot of digging and I think the documentation could benefit from some clarification. I deal with logarithmic quantities all the time in astronomy so this is quite useful to me.
The isrootpower_dim is required to avoid the following:
julia> foo =3*log₁₀d
ERROR: undefined behavior. Please file an issue with the code needed to reproduce.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] isrootpower_dim(::Unitful.Dimensions{(Unitful.Dimension{:Time}(1//1),)}) at /home/mark/.julia/packages/Unitful/W0mMi/src/logarithm.jl:200
[3] isrootpower(::Quantity{Int64,𝐓,Unitful.FreeUnits{(d,),𝐓,nothing}}) at /home/mark/.julia/packages/Unitful/W0mMi/src/logarithm.jl:199
[4] fromlog(::Type, ::Quantity{Int64,𝐓,Unitful.FreeUnits{(d,),𝐓,nothing}}, ::Int64) at /home/mark/.julia/packages/Unitful/W0mMi/src/logarithm.jl:116
[5] *(::Int64, ::Unitful.MixedUnits{Level{Unitful.LogInfo{:LogBase10,10,1},1 d,T} where T<:Number,Unitful.FreeUnits{(),NoDims,nothing}}) at /home/mark/.julia/packages/Unitful/W0mMi/src/logarithm.jl:147
[6] top-level scope at none:0
The text was updated successfully, but these errors were encountered:
(I posted this in an old pull request #103 and realized nobody would ever see it there)
I've been struggling with this all day and finally got it to work. I had to do a lot of digging and I think the documentation could benefit from some clarification. I deal with logarithmic quantities all the time in astronomy so this is quite useful to me.
The
isrootpower_dim
is required to avoid the following:The text was updated successfully, but these errors were encountered: