Skip to content

Commit d89addd

Browse files
authored
docs: remove mention of Rational in convert (#42949)
1 parent 110068f commit d89addd

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

base/essentials.jl

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ Stacktrace:
181181
[...]
182182
```
183183
184-
If `T` is a [`AbstractFloat`](@ref) or [`Rational`](@ref) type,
184+
If `T` is a [`AbstractFloat`](@ref) type,
185185
then it will return the closest value to `x` representable by `T`.
186186
187187
```jldoctest
@@ -191,11 +191,8 @@ julia> x = 1/3
191191
julia> convert(Float32, x)
192192
0.33333334f0
193193
194-
julia> convert(Rational{Int32}, x)
195-
1//3
196-
197-
julia> convert(Rational{Int64}, x)
198-
6004799503160661//18014398509481984
194+
julia> convert(BigFloat, x)
195+
0.333333333333333314829616256247390992939472198486328125
199196
```
200197
201198
If `T` is a collection type and `x` a collection, the result of

0 commit comments

Comments
 (0)