Skip to content

Commit 276af84

Browse files
authored
use native Julia code in round example (#46841)
1 parent 89c4a2a commit 276af84

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

base/floatfuncs.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,12 @@ julia> round(357.913; sigdigits=4, base=2)
9999
value represented by `1.15` is actually *less* than 1.15, yet will be
100100
rounded to 1.2. For example:
101101
102-
```jldoctest; setup = :(using Printf)
102+
```jldoctest
103103
julia> x = 1.15
104104
1.15
105105
106-
julia> @sprintf "%.20f" x
107-
"1.14999999999999991118"
106+
julia> big(1.15)
107+
1.149999999999999911182158029987476766109466552734375
108108
109109
julia> x < 115//100
110110
true

0 commit comments

Comments
 (0)