@@ -671,18 +671,12 @@ function Base.:(==)(dec::DecimalFloatingPoint, rat::Rational)
671671end
672672
673673Base.:(== )(dec:: T , num:: Union{BigFloat,Float16,Float32,Float64,Integer} ) where {T<: DecimalFloatingPoint } = dec == T (num, RoundUp) == T (num, RoundDown)
674- Base.:> (dec:: T , num:: Union{BigFloat,Float16,Float32,Float64,Integer,AbstractIrrational} ) where {T<: DecimalFloatingPoint } = dec > T (num, RoundDown)
674+ Base.:(== )(num:: Union{BigFloat,Float16,Float32,Float64,Integer} , dec:: T ) where {T<: DecimalFloatingPoint } = dec == num
675+ Base.:< (num:: Union{BigFloat,Float16,Float32,Float64,Integer,AbstractIrrational} , dec:: T ) where {T<: DecimalFloatingPoint } = T (num, RoundDown) < dec
675676Base.:< (dec:: T , num:: Union{BigFloat,Float16,Float32,Float64,Integer,AbstractIrrational} ) where {T<: DecimalFloatingPoint } = dec < T (num, RoundUp)
676- Base.:(> = )(dec :: T , num:: Union{BigFloat,Float16,Float32,Float64,Integer} ) where {T<: DecimalFloatingPoint } = dec >= T (num, RoundUp)
677+ Base.:(< = )(num:: Union{BigFloat,Float16,Float32,Float64,Integer} , dec :: T ) where {T<: DecimalFloatingPoint } = T (num, RoundUp) <= dec
677678Base.:(<= )(dec:: T , num:: Union{BigFloat,Float16,Float32,Float64,Integer} ) where {T<: DecimalFloatingPoint } = dec <= T (num, RoundDown)
678679
679- # canonicalize comparison order:
680- Base.:(== )(num:: Union{BigFloat,Float16,Float32,Float64,Integer} , dec:: T ) where {T<: DecimalFloatingPoint } = dec == num
681- Base.:> (num:: Union{BigFloat,Float16,Float32,Float64,Integer,AbstractIrrational} , dec:: T ) where {T<: DecimalFloatingPoint } = dec < num
682- Base.:< (num:: Union{BigFloat,Float16,Float32,Float64,Integer,AbstractIrrational} , dec:: T ) where {T<: DecimalFloatingPoint } = dec > num
683- Base.:(>= )(num:: Union{BigFloat,Float16,Float32,Float64,Integer} , dec:: T ) where {T<: DecimalFloatingPoint } = dec <= num
684- Base.:(<= )(num:: Union{BigFloat,Float16,Float32,Float64,Integer} , dec:: T ) where {T<: DecimalFloatingPoint } = dec >= num
685-
686680# used for next/prevfloat:
687681const pinf128 = parse (Dec128, " +Inf" )
688682const minf128 = parse (Dec128, " -Inf" )
0 commit comments