`julia> a

1.653782960785311e14

julia> round(a,2)

1.653782960785311e14

`

how to round 1.653782960785311e14 to 1.66e14 ?

Paul

`julia> a

1.653782960785311e14

julia> round(a,2)

1.653782960785311e14

`

how to round 1.653782960785311e14 to 1.66e14 ?

Paul

```
signif(1.653782960785311e14,3)
```

3 Likes

That reads as â€śsign ifâ€ť to me.

6 Likes

Thanks, For all array not works , is something for array ?

Like:

signif(rand(5),3)

ERROR: MethodError: no method matching signif(::Array{Float64,1}, ::Int64)

Closest candidates are:

signif(::Real, ::Integer) at floatfuncs.jl:136

signif(::Real, ::Integer, ::Integer) at floatfuncs.jl:136

paul

W dniu 2018-03-27 o 21:56, Simon Byrne pisze:

try signif.(rand(5),3))

which will boadcast the operation

Same here so much for terse function namesâ€¦

1 Like

+1

Can someone translate how I should read it correctly? Why it isnâ€™t round?

I guess we pronounce it as * signif*-icant.

```
help?> signif
search: signif significand signbit
signif(x, digits, [base])
Rounds (in the sense of round) x so that there are digits significant digits, under a base base representation, default 10.
E.g., signif(123.456, 2) is 120.0, and signif(357.913, 4, 2) is 352.0.
```

signif is too short, better is sigdigits [sigdigs if you must])

2 Likes

â€śsignifâ€ť is what R calls it, fwiw: https://stat.ethz.ch/R-manual/R-devel/library/base/html/Round.html

1 Like

its worth very little to those of us who are pleased to have let go of R

(glad you are around, Harlan)

It probably should be a method of round if someone wants to open an issue.

1 Like