SciBaseTypes-0.1.0.0: Base types and classes for statistics, sciences and humanities

Safe HaskellNone
LanguageHaskell2010

Numeric.LogDomain

Description

This module provides log-domain functionality. Ed Kmett provides, with log-domain, a generic way to handle numbers in the log-domain, some which is used under the hood here. We want some additional type safety and also connect with the SemiRing module.

Synopsis

Documentation

class LogDomain x where Source #

Instances for LogDomain x should be for specific types.

Associated Types

type Ln x :: * Source #

The type family to connect a type x with the type Ln x in the log-domain.

Methods

logdom :: MonadError String m => x -> m (Ln x) Source #

Transport a value in x into the log-domain. logdom should throw an exception if log x is not valid.

unsafelogdom :: x -> Ln x Source #

Unsafely transport x into the log-domain.

lindom :: Ln x -> x Source #

Transport a value Ln x back into the linear domain x.

Instances
LogDomain Double Source # 
Instance details

Defined in Numeric.LogDomain

Associated Types

type Ln Double :: Type Source #