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
Optimize zero(FD{T,f}): implement via reinterpret not convert. (#46)
* Optimize zero(FD{T,f}): reinterpret not convert.
I also noticed, though, that reinterpret() is still not fully
const-folding. It often folds away in simple constructions, but inside
complex expressions it isn't.
I fixed this by marking both `reinterpret` and `max_exp10` as `Base.@pure`.
* Add comment explaining motivation for `Base.zero(FD)`
* Spacing fix in src/FixedPointDecimals.jl
Co-Authored-By: NHDaly <NHDaly@gmail.com>
* Also optimize `Base.one` to fully const-fold.
- Add definition for Base.one(::Type{FD{T,f}})
- Mark coefficient(::Type{FD{T,f}}) as `Base.@pure` as well.
* Update comment for coefficient being `@pure`
0 commit comments