# How to display Float64 with more digits

**URL:** <https://discourse.julialang.org/t/how-to-display-float64-with-more-digits/5628>\
**Category:** General Usage\
**Tags:** repl\
**Created:** [August 30, 2017, 9:03am UTC](https://discourse.julialang.org/t/how-to-display-float64-with-more-digits/5628 "2017-08-30T09:03:35Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [August 30, 2017, 10:34am UTC](https://discourse.julialang.org/t/how-to-display-float64-with-more-digits/5628/2 "2017-08-30T10:34:25Z")

</div>

A quick hack (overwriting the method to ignore the `compact` directive in the `IOContext`):

```julia
<< Base.show(io::IO, x::Union{Float64,Float32}) = Base.Grisu._show(io, x, Base.Grisu.SHORTEST, 0, true, false)
WARNING: Method definition show(IO, Union{Float64, Float32}) in module Grisu at grisu/grisu.jl:120 overwritten in module Main at REPL[0]:1.

<< rand(5)
>> 5-element Array{Float64,1}:
 0.41685881323027596
 0.43774537729371676
 0.8202714955342147 
 0.04893977866057142
 0.10743689580376481

```

---

_[View the full topic](https://discourse.julialang.org/t/how-to-display-float64-with-more-digits/5628)._
