# Why does scientific notation break the range function?

**URL:** <https://discourse.julialang.org/t/why-does-scientific-notation-break-the-range-function/80014>\
**Category:** New to Julia\
**Created:** [April 25, 2022, 8:46pm UTC](https://discourse.julialang.org/t/why-does-scientific-notation-break-the-range-function/80014 "2022-04-25T20:46:57Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [April 25, 2022, 10:27pm UTC](https://discourse.julialang.org/t/why-does-scientific-notation-break-the-range-function/80014/10 "2022-04-25T22:27:00Z")

</div>

> [@chadagreene](#):
>
> Should the `range` function be updated to allow whole numbers for the length definition, even if they’re Floats?

Allowing floating-point values to specify array lengths was discussed pretty early on in the development of Julia (in 2011!), and was ultimately rejected. See the discussion here [Matrix constructors should be able to take floating point value for size · Issue #136 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/136) and here [Pass integer valued floats to matrix constructors · Issue #1972 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/1972) and here [zeros(1e4) -\> ERROR: no method Array(DataType,Float64) · Issue #4275 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/4275) for example.

---

_[View the full topic](https://discourse.julialang.org/t/why-does-scientific-notation-break-the-range-function/80014)._
