# Round function for float

**URL:** https://discourse.julialang.org/t/round-function-for-float/19753
**Category:** General Usage
**Tags:** question
**Created:** [January 17, 2019, 6:04pm UTC](https://discourse.julialang.org/t/round-function-for-float/19753 "2019-01-17T18:04:37Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![leclere](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/leclere/32/3644_2.png) [@leclere](https://discourse.julialang.org/u/leclere)
#### Post date: [January 17, 2019, 6:04pm UTC](https://discourse.julialang.org/t/round-function-for-float/19753/1 "2019-01-17T18:04:38Z")

</div>

I was surprised to see that round(3.14159,2) was no more available in julia 1.0.  
Is there any alternative ? (I saw that signif have also disappeared).

---

<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: [January 17, 2019, 6:10pm UTC](https://discourse.julialang.org/t/round-function-for-float/19753/2 "2019-01-17T18:10:09Z")

</div>

> [@PSA: use Julia 0.7 if you are upgrading](https://discourse.julialang.org/t/psa-use-julia-0-7-if-you-are-upgrading/13321):
>
> A lot of people are posting issues where their old code doesn’t work anymore on 1.0 because some function has been renamed or removed. The 0.7 release exists exactly for this reason: your old code will work on 0.7 and give you a specific warning about how to fix your code. If you have any old code, you should use 0.7 to get these warnings before switching to 1.0; even if you just have work habits that may need changing, you should probably use 0.7 for a while. If someone posts an issue like thi…

> `signif` has been deprecated in favor of the `sigdigits` keyword argument to `round` .

See also [here](https://docs.julialang.org/en/v0.7.0/NEWS/).

---

<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: [January 17, 2019, 6:14pm UTC](https://discourse.julialang.org/t/round-function-for-float/19753/3 "2019-01-17T18:14:05Z")

</div>

In Julia 0.7, you will get warnings that tell you the new names:

```julia
julia> round(3.14159,2)
┌ Warning: `round(x::Number, digits)` is deprecated, use `round(x; digits=digits)` instead.
│ caller = top-level scope at none:0
└ @ Core none:0
3.14

julia> signif(3.14159, 2)
┌ Warning: `signif(x::Number, digits)` is deprecated, use `round(x; sigdigits=digits)` instead.
│ caller = top-level scope at none:0
└ @ Core none:0
3.1

```
