{-# LANGUAGE DataKinds #-}
{-# LANGUAGE HexFloatLiterals #-}
module Numeric.Rounded.Hardware.Internal.Constants where
import Numeric.Rounded.Hardware.Internal.Rounding
class RealFloatConstants a where
positiveInfinity :: a
negativeInfinity :: a
maxFinite :: a
minPositive :: a
pi_down :: Rounded 'TowardNegInf a
pi_up :: Rounded 'TowardInf a
three_pi_down :: Rounded 'TowardNegInf a
three_pi_up :: Rounded 'TowardInf a
five_pi_down :: Rounded 'TowardNegInf a
five_pi_up :: Rounded 'TowardInf a
log2_down :: Rounded 'TowardNegInf a
log2_up :: Rounded 'TowardInf a
exp1_down :: Rounded 'TowardNegInf a
exp1_up :: Rounded 'TowardInf a
exp1_2_down :: Rounded 'TowardNegInf a
exp1_2_up :: Rounded 'TowardInf a
expm1_2_down :: Rounded 'TowardNegInf a
expm1_2_up :: Rounded 'TowardInf a
sqrt2_down :: Rounded 'TowardNegInf a
sqrt2_up :: Rounded 'TowardInf a
sqrt2m1_down :: Rounded 'TowardNegInf a
sqrt2m1_up :: Rounded 'TowardInf a
sqrt1_2_down :: Rounded 'TowardNegInf a
sqrt1_2_up :: Rounded 'TowardInf a
three_minus_2sqrt2_down :: Rounded 'TowardNegInf a
three_minus_2sqrt2_up :: Rounded 'TowardInf a
two_minus_sqrt2_down :: Rounded 'TowardNegInf a
two_minus_sqrt2_up :: Rounded 'TowardInf a
instance RealFloatConstants Double where
positiveInfinity = 1/0
negativeInfinity = -1/0
maxFinite = 0x1.fffffffffffffp+1023
minPositive = 0x1p-1074
pi_down = Rounded 0x1.921fb54442d18p+1
pi_up = Rounded 0x1.921fb54442d19p+1
three_pi_down = Rounded 0x1.2d97c7f3321d2p+3
three_pi_up = Rounded 0x1.2d97c7f3321d3p+3
five_pi_down = Rounded 0x1.f6a7a2955385ep+3
five_pi_up = Rounded 0x1.f6a7a2955385fp+3
log2_down = Rounded 0x1.62e42fefa39efp-1
log2_up = Rounded 0x1.62e42fefa39f0p-1
exp1_down = Rounded 0x1.5bf0a8b145769p+1
exp1_up = Rounded 0x1.5bf0a8b14576ap+1
exp1_2_down = Rounded 0x1.a61298e1e069bp+0
exp1_2_up = Rounded 0x1.a61298e1e069cp+0
expm1_2_down = Rounded 0x1.368b2fc6f9609p-1
expm1_2_up = Rounded 0x1.368b2fc6f960ap-1
sqrt2_down = Rounded 0x1.6a09e667f3bccp+0
sqrt2_up = Rounded 0x1.6a09e667f3bcdp+0
sqrt1_2_down = Rounded 0x1.6a09e667f3bccp-1
sqrt1_2_up = Rounded 0x1.6a09e667f3bcdp-1
sqrt2m1_down = Rounded 0x1.a827999fcef32p-2
sqrt2m1_up = Rounded 0x1.a827999fcef33p-2
three_minus_2sqrt2_down = Rounded 0x1.5f619980c4336p-3
three_minus_2sqrt2_up = Rounded 0x1.5f619980c4337p-3
two_minus_sqrt2_down = Rounded 0x1.2bec333018866p-1
two_minus_sqrt2_up = Rounded 0x1.2bec333018867p-1
{-# INLINE positiveInfinity #-}
{-# INLINE negativeInfinity #-}
{-# INLINE maxFinite #-}
{-# INLINE minPositive #-}
instance RealFloatConstants Float where
positiveInfinity = 1/0
negativeInfinity = -1/0
maxFinite = 0x1.fffffep+127
minPositive = 0x1p-149
pi_down = Rounded 0x1.921fb4p+1
pi_up = Rounded 0x1.921fb6p+1
three_pi_down = Rounded 0x1.2d97c6p+3
three_pi_up = Rounded 0x1.2d97c8p+3
five_pi_down = Rounded 0x1.f6a7a2p+3
five_pi_up = Rounded 0x1.f6a7a4p+3
log2_down = Rounded 0x1.62e42ep-1
log2_up = Rounded 0x1.62e430p-1
exp1_down = Rounded 0x1.5bf0a8p+1
exp1_up = Rounded 0x1.5bf0aap+1
exp1_2_down = Rounded 0x1.a61298p+0
exp1_2_up = Rounded 0x1.a6129ap+0
expm1_2_down = Rounded 0x1.368b2ep-1
expm1_2_up = Rounded 0x1.368b30p-1
sqrt2_down = Rounded 0x1.6a09e6p+0
sqrt2_up = Rounded 0x1.6a09e8p+0
sqrt1_2_down = Rounded 0x1.6a09e6p-1
sqrt1_2_up = Rounded 0x1.6a09e8p-1
sqrt2m1_down = Rounded 0x1.a82798p-2
sqrt2m1_up = Rounded 0x1.a8279ap-2
three_minus_2sqrt2_down = Rounded 0x1.5f6198p-3
three_minus_2sqrt2_up = Rounded 0x1.5f619ap-3
two_minus_sqrt2_down = Rounded 0x1.2bec32p-1
two_minus_sqrt2_up = Rounded 0x1.2bec34p-1
{-# INLINE positiveInfinity #-}
{-# INLINE negativeInfinity #-}
{-# INLINE maxFinite #-}
{-# INLINE minPositive #-}