grisette-0.7.0.0: Symbolic evaluation as a library
Copyright(c) Sirui Lu 2024
LicenseBSD-3-Clause (see the LICENSE file)
Maintainersiruilu@cs.washington.edu
StabilityExperimental
PortabilityGHC only
Safe HaskellSafe-Inferred
LanguageHaskell2010

Grisette.Internal.Core.Data.Class.IEEEFP

Description

 
Synopsis

Documentation

fpIsNaN :: RealFloat a => a -> Bool Source #

Check if a floating-point number is not-a-number.

fpIsPositiveZero :: RealFloat a => a -> Bool Source #

Check if a floating-point number is positive zero.

fpIsNegativeZero :: RealFloat a => a -> Bool Source #

Check if a floating-point number is negative zero.

fpIsPositiveInfinite :: RealFloat a => a -> Bool Source #

Check if a floating-point number is positive infinite.

fpIsNegativeInfinite :: RealFloat a => a -> Bool Source #

Check if a floating-point number is negative infinite.

fpIsPositive :: RealFloat a => a -> Bool Source #

Check if a floating-point number is positive. +0, +inf are considered positive. nan, -0, -inf are not positive.

fpIsNegative :: RealFloat a => a -> Bool Source #

Check if a floating-point number is negative. -0, -inf are considered negative. nan, +0, +inf are not negative.

fpIsInfinite :: RealFloat a => a -> Bool Source #

Check if a floating-point number is infinite.

fpIsZero :: RealFloat a => a -> Bool Source #

Check if a floating-point number is zero.

fpIsNormal :: RealFloat a => a -> Bool Source #

Check if a floating-point number is normal, i.e., not 0, not inf, not nan, and not denormalized.

fpIsSubnormal :: RealFloat a => a -> Bool Source #

Check if a floating-point number is subnormal, i.e., denormalized. 0, inf, or nan are not subnormal.

fpIsPoint :: RealFloat a => a -> Bool Source #

Check if a floating-point number is a point, i.e., not inf, not nan.

class SymIEEEFPTraits a where Source #

A class for symbolic traits of IEEE floating-point numbers.

Methods

symFpIsNaN :: a -> SymBool Source #

Check if a symbolic floating-point number is not-a-number.

symFpIsPositive :: a -> SymBool Source #

Check if a symbolic floating-point number is positive. +0, +inf are considered positive. nan, -0, -inf are not positive.

symFpIsNegative :: a -> SymBool Source #

Check if a symbolic floating-point number is negative. -0, -inf are considered negative. nan, +0, +inf are not negative.

symFpIsPositiveInfinite :: a -> SymBool Source #

Check if a symbolic floating-point number is positive infinite.

symFpIsNegativeInfinite :: a -> SymBool Source #

Check if a symbolic floating-point number is negative infinite.

symFpIsInfinite :: a -> SymBool Source #

Check if a symbolic floating-point number is infinite.

symFpIsPositiveZero :: a -> SymBool Source #

Check if a symbolic floating-point number is positive zero.

symFpIsNegativeZero :: a -> SymBool Source #

Check if a symbolic floating-point number is negative zero.

symFpIsZero :: a -> SymBool Source #

Check if a symbolic floating-point number is zero.

symFpIsNormal :: a -> SymBool Source #

Check if a symbolic floating-point number is normal, i.e., not 0, not inf, not nan, and not denormalized.

symFpIsSubnormal :: a -> SymBool Source #

Check if a symbolic floating-point number is subnormal, i.e., denormalized. 0, inf, or nan are not subnormal.

symFpIsPoint :: a -> SymBool Source #

Check if a symbolic floating-point number is a point, i.e., not inf, not nan.

Instances

Instances details
SymIEEEFPTraits Double Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.IEEEFP

SymIEEEFPTraits Float Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.IEEEFP

ValidFP eb sb => SymIEEEFPTraits (FP eb sb) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.IEEEFP

ValidFP eb sb => SymIEEEFPTraits (SymFP eb sb) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.IEEEFP

class IEEEConstants a where Source #

Constants for IEEE floating-point numbers.

Methods

fpPositiveInfinite :: a Source #

Positive infinity.

fpNegativeInfinite :: a Source #

Negative infinity.

fpNaN :: a Source #

Not-a-number.

fpNegativeZero :: a Source #

Negative zero.

fpPositiveZero :: a Source #

Positive zero.

Instances

Instances details
ValidFP eb sb => IEEEConstants (FP eb sb) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.IEEEFP

ValidFP eb sb => IEEEConstants (SymFP eb sb) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.IEEEFP

class IEEEFPRoundingMode mode where Source #

Rounding modes for floating-point operations.

Methods

rne :: mode Source #

Round to nearest, ties to even.

rna :: mode Source #

Round to nearest, ties to away from zero.

rtp :: mode Source #

Round towards positive infinity.

rtn :: mode Source #

Round towards negative infinity.

rtz :: mode Source #

Round towards zero.

class IEEEFPOp a where Source #

Operations on IEEE floating-point numbers, without rounding mode.

Methods

symFpAbs :: a -> a Source #

symFpNeg :: a -> a Source #

symFpRem :: a -> a -> a Source #

symFpMin :: a -> a -> a Source #

symFpMax :: a -> a -> a Source #

Instances

Instances details
ValidFP eb sb => IEEEFPOp (SymFP eb sb) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.IEEEFP

Methods

symFpAbs :: SymFP eb sb -> SymFP eb sb Source #

symFpNeg :: SymFP eb sb -> SymFP eb sb Source #

symFpRem :: SymFP eb sb -> SymFP eb sb -> SymFP eb sb Source #

symFpMin :: SymFP eb sb -> SymFP eb sb -> SymFP eb sb Source #

symFpMax :: SymFP eb sb -> SymFP eb sb -> SymFP eb sb Source #

class IEEEFPRoundingMode mode => IEEEFPRoundingOp a mode | a -> mode where Source #

Operations on IEEE floating-point numbers, with rounding mode.

Methods

symFpAdd :: mode -> a -> a -> a Source #

symFpSub :: mode -> a -> a -> a Source #

symFpMul :: mode -> a -> a -> a Source #

symFpDiv :: mode -> a -> a -> a Source #

symFpFMA :: mode -> a -> a -> a -> a Source #

symFpSqrt :: mode -> a -> a Source #

symFpRoundToIntegral :: mode -> a -> a Source #

Instances

Instances details
ValidFP eb sb => IEEEFPRoundingOp (SymFP eb sb) SymFPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.IEEEFP

Methods

symFpAdd :: SymFPRoundingMode -> SymFP eb sb -> SymFP eb sb -> SymFP eb sb Source #

symFpSub :: SymFPRoundingMode -> SymFP eb sb -> SymFP eb sb -> SymFP eb sb Source #

symFpMul :: SymFPRoundingMode -> SymFP eb sb -> SymFP eb sb -> SymFP eb sb Source #

symFpDiv :: SymFPRoundingMode -> SymFP eb sb -> SymFP eb sb -> SymFP eb sb Source #

symFpFMA :: SymFPRoundingMode -> SymFP eb sb -> SymFP eb sb -> SymFP eb sb -> SymFP eb sb Source #

symFpSqrt :: SymFPRoundingMode -> SymFP eb sb -> SymFP eb sb Source #

symFpRoundToIntegral :: SymFPRoundingMode -> SymFP eb sb -> SymFP eb sb Source #