futhark-data-1.1.0.1: An implementation of the Futhark data format.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Futhark.Data.Compare

Description

Facilities for comparing values for equality. While Eq instances are defined, these are not useful when NaNs are involved, and do not *explain* the differences.

Synopsis

Documentation

compareValues :: Tolerance -> Value -> Value -> [Mismatch] Source #

Compare two Futhark values for equality.

compareSeveralValues :: Tolerance -> [Value] -> [Value] -> [Mismatch] Source #

As compareValues, but compares several values. The two lists must have the same length.

newtype Tolerance Source #

The maximum relative tolerance used for comparing floating-point results. 0.002 (0.2%) is a fine default if you have no particular opinion.

Constructors

Tolerance Double 

Instances

Instances details
Show Tolerance Source # 
Instance details

Defined in Futhark.Data.Compare

Eq Tolerance Source # 
Instance details

Defined in Futhark.Data.Compare

Ord Tolerance Source # 
Instance details

Defined in Futhark.Data.Compare

data Mismatch Source #

Two values differ in some way. The Show instance produces a human-readable explanation.

Instances

Instances details
Show Mismatch Source # 
Instance details

Defined in Futhark.Data.Compare