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
Hi, I'd like to take this up. I have some queries though, for Eg, the Base.float(x::Dual) is defined here as follows: Base.float(d::Dual{T,V,N}) where {T,V,N} = convert(Dual{T,promote_type(V, Float16),N}, d)
Should I stick to the same format for Base.big(x::Dual) too?
Thanks :)
Activity
Pramodh-G commentedon Jul 22, 2021
Hi, I'd like to take this up. I have some queries though, for Eg, the
Base.float(x::Dual)is defined here as follows:Base.float(d::Dual{T,V,N}) where {T,V,N} = convert(Dual{T,promote_type(V, Float16),N}, d)Should I stick to the same format for
Base.big(x::Dual)too?Thanks :)
stevengj commentedon Jul 22, 2021
I think the
floatfunction is wrong (see #535), so I wouldn't follow that model.Calling
bigon the values seems like the best way to make it consistent withBase.dlfivefifty commentedon Jul 28, 2021
I ran into this in code that tried to convert to
BigFloat. So I’m wondering whether to dobig(float(x))orfloat(big(x))?stevengj commentedon Jul 28, 2021
big(float(x))should generally be faster, assumingfloat(x)doesn't lose precision (e.g.xis an integer ≤maxintfloat)markmbaum commentedon Oct 2, 2021
@stevengj is there a reason that
floatminandfloatmaxare not implemented forDualnumbers? Just ran into that issue and found this issue.