Skip to content

Commit 28aeabc

Browse files
committed
Update base/rational.jl
1 parent b2cda54 commit 28aeabc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

base/rational.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ Float16(x::Rational{<:Union{Int16,Int32,Int64,UInt16,UInt32,UInt64}}) =
151151
Float16(Float32(x))
152152
Float16(x::Rational{<:Union{Int128,UInt128}}) =
153153
Float16(Float64(x)) # UInt128 overflows Float32, include Int128 for consistency
154+
Float32(x::Rational{<:Union{Int128,UInt128}}) =
155+
Float32(Float64(x)) # UInt128 overflows Float32, include Int128 for consistency
154156

155157
function Rational{T}(x::AbstractFloat) where T<:Integer
156158
r = rationalize(T, x, tol=0)

0 commit comments

Comments
 (0)