11module Quadmath
22using Requires
33
4- export Float128, ComplexF128
4+ export Float128, ComplexF128, Inf128
55
66import Base: (* ), + , - , / , < , <= , == , ^ , convert,
77 reinterpret, sign_mask, exponent_mask, exponent_one, exponent_half,
@@ -13,7 +13,7 @@ import Base: (*), +, -, /, <, <=, ==, ^, convert,
1313 tan, tanh,
1414 ceil, floor, trunc, round, fma,
1515 copysign, flipsign, max, min, hypot, abs,
16- ldexp, frexp, modf, nextfloat, eps,
16+ ldexp, frexp, modf, nextfloat, typemax, typemin, eps,
1717 isinf, isnan, isfinite, isinteger,
1818 floatmin, floatmax, precision, signbit, maxintfloat,
1919 Int32, Int64, Float64, BigFloat, BigInt
@@ -368,6 +368,14 @@ floatmin(::Type{Float128}) = reinterpret(Float128, 0x0001_0000_0000_0000_0000_00
368368floatmax (:: Type{Float128} ) = reinterpret (Float128, 0x7ffe_ffff_ffff_ffff_ffff_ffff_ffff_ffff )
369369
370370maxintfloat (:: Type{Float128} ) = Float128 (0x0002_0000_0000_0000_0000_0000_0000_0000 )
371+ """
372+ Inf128
373+
374+ Positive infinity of type [`Float128`](@ref).
375+ """
376+ const Inf128 = reinterpret (Float128, 0x7fff_0000_0000_0000_0000_0000_0000_0000 )
377+ typemax (:: Type{Float128} ) = Inf128
378+ typemin (:: Type{Float128} ) = - Inf128
371379
372380ldexp (x:: Float128 , n:: Cint ) =
373381 Float128 (@ccall (libquadmath. ldexpq (x:: Cfloat128 , n:: Cint ):: Cfloat128 ))
0 commit comments