JuliaAtoms / AtomicLevels.jl

https://juliaatoms.org/AtomicLevels.jl
Other
12 stars 3 forks source link

Merge HalfInteger improvements upstream #18

Closed jagot closed 5 years ago

jagot commented 5 years ago

I also found this problem with ranges of HalfIntegers:

julia> hi"1":hi"-1":hi"-1"
ERROR: rem not defined for HalfInteger
Stacktrace:
 [1] error(::String, ::String, ::Type) at ./error.jl:42
 [2] no_op_err(::String, ::Type) at ./promotion.jl:410
 [3] rem(::HalfInteger, ::HalfInteger) at ./promotion.jl:429
 [4] (::Colon)(::HalfInteger, ::HalfInteger, ::HalfInteger) at ./range.jl:207
 [5] top-level scope at none:0

julia> reverse(hi"-1":hi"1")
3-element Array{HalfInteger,1}:
  1
  0
 -1
mortenpi commented 5 years ago

I should probably implement the 3-argument version of Base.:(:) for completeness.

jagot commented 5 years ago

Implemented in WignerSymbols v0.3.0 and f7d5253. Pending checks.

jagot commented 5 years ago

Fixed! Thanks @mortenpi