# Scientific Notation in REPL

**URL:** <https://discourse.julialang.org/t/scientific-notation-in-repl/79841>\
**Category:** New to Julia\
**Tags:** numbers, repl, io\
**Created:** [April 22, 2022, 1:34pm UTC](https://discourse.julialang.org/t/scientific-notation-in-repl/79841 "2022-04-22T13:34:06Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![MA\_Laforge](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ma_laforge/32/385_2.png) [@MA\_Laforge](https://discourse.julialang.org/u/MA_Laforge)\
**Post date:** [May 9, 2022, 2:25am UTC](https://discourse.julialang.org/t/scientific-notation-in-repl/79841/10 "2022-05-09T02:25:49Z")

</div>

> [@yashi](#):
>
> [REPL setup](https://github.com/ma-laforge/NumericIO.jl/#improved-repl-output-julia-console) in the README doesn’t work with Julia 1.7.

Correct: `REPL` moved out of base and into its own module.

You now have to write:

```julia
import REPL
using NumericIO
Base.display(r::REPL.REPLDisplay, v::Union{Float32,Float64}) = print(formatted(REPL.outstream(r.repl), :SI, ndigits=4), v)

```

### Dangers of overwriting `show()`

I recommend against overwriting `show()` as it is somewhat of a base function, and changing it might have unexpected repercussions in other modules elsewhere.

It is much safer to overwrite the `Base.display()` function, as it applies only to results displayed to the REPL (aka Julia “console”). REPL output is meant for human consumption, and is not typically read back by machine.

For more details on the display/print/show/… call stack, you might want to take a look here:

> [@Improving doc for display/print/show/repr/](https://discourse.julialang.org/t/improving-doc-for-display-print-show-repr/69124/3):
>
> Sorry. Got sidetracked when I first outlined this issue - haven’t have much time to look deeper into it. Decided to include graphical view of call stack before I forget I made it (for a second time):

(Note that display calls either `print()` or `show()`… but I did not draw it on that diagram).

---

_[View the full topic](https://discourse.julialang.org/t/scientific-notation-in-repl/79841)._
