# Are BigFloats unable to exactly represent 0.1?

**URL:** <https://discourse.julialang.org/t/are-bigfloats-unable-to-exactly-represent-0-1/62192>\
**Category:** General Usage\
**Created:** [June 1, 2021, 1:50pm UTC](https://discourse.julialang.org/t/are-bigfloats-unable-to-exactly-represent-0-1/62192 "2021-06-01T13:50:30Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Post date:** [June 1, 2021, 2:21pm UTC](https://discourse.julialang.org/t/are-bigfloats-unable-to-exactly-represent-0-1/62192/6 "2021-06-01T14:21:01Z")

</div>

It’s for the same reason that 0.1 + 0.2 != 0.3 ([https://0.30000000000000004.com](https://0.30000000000000004.com))

> [@roflmaostc](#):
>
> How does the show method know that we want to see 0.1 and not the real value that’s stored?

Julia prints the shortest value that uniquely identifies the float in question when parsed back. The algorithm in question is called “Ryu”, you can find the julia implementation [here](https://github.com/JuliaLang/julia/blob/master/base/ryu/Ryu.jl).

---

_[View the full topic](https://discourse.julialang.org/t/are-bigfloats-unable-to-exactly-represent-0-1/62192)._
