# Is this a bug (scalar+ranges) with the parser?

**URL:** https://discourse.julialang.org/t/is-this-a-bug-scalar-ranges-with-the-parser/70670
**Category:** Internals & Design
**Tags:** broadcasting, range
**Created:** [October 30, 2021, 7:45pm UTC](https://discourse.julialang.org/t/is-this-a-bug-scalar-ranges-with-the-parser/70670 "2021-10-30T19:45:44Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![woclass](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/woclass/32/212699_2.png) [@woclass](https://discourse.julialang.org/u/woclass)
#### Post date: [October 31, 2021, 8:02am UTC](https://discourse.julialang.org/t/is-this-a-bug-scalar-ranges-with-the-parser/70670/8 "2021-10-31T08:02:35Z")

</div>

Fixed in 1.7.0-rc2

[https://github.com/JuliaLang/julia/issues/42291](https://github.com/JuliaLang/julia/issues/42291)

```julia
julia> v = (1:5) .- 1/7
0.8571428571428572:1.0:4.857142857142858

julia> length(v)
5

julia> versioninfo()
Julia Version 1.7.0-rc2
Commit f23fc0d27a* (2021-10-20 12:45 UTC)
DEBUG build
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i5-9400F CPU @ 2.90GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake)

```

But …

```julia
julia> ( (1:5) .- 1/7 ) == ( collect(1:5) .- 1/7 )
false

julia> collect( (1:5) .- 1/7 ) == ( collect(1:5) .- 1/7 )
false

julia> collect( (1:5) .- 1/7 )
5-element Vector{Float64}:
 0.8571428571428572
 1.8571428571428572
 2.857142857142857
 3.857142857142857
 4.857142857142858

julia> ( collect(1:5) .- 1/7 )
5-element Vector{Float64}:
 0.8571428571428572
 1.8571428571428572
 2.857142857142857
 3.857142857142857
 4.857142857142857

```

Interesting floating point numbers

```julia
julia> 1 - 1/7 + 4
4.857142857142858

julia> 1 + 4 - 1/7
4.857142857142857

julia> (1 - 1/7 + 4) == (1 + 4 - 1/7)
false

```

---

_[View the full topic](https://discourse.julialang.org/t/is-this-a-bug-scalar-ranges-with-the-parser/70670)._
