planet-mitchell-0.1.0: Planet Mitchell

Safe HaskellNone
LanguageHaskell2010

Num.Fast

Synopsis

Documentation

class Floating a => Fast a where #

Minimal complete definition

flog, flog_lb, flog_ub, fexp, fexp_lb, fexp_ub, fpow, fpow_lb, fpow_ub

Methods

flog :: a -> a #

Calculate an approximate log.

flog_lb :: a -> a #

flog_ub :: a -> a #

fexp :: a -> a #

Calculate an approximate exp.

fexp_lb :: a -> a #

fexp_ub :: a -> a #

fpow :: a -> a -> a #

Calculate an approximate pow.

fpow_lb :: a -> a -> a #

fpow_ub :: a -> a -> a #

blog :: Floating a => a -> a #

Borchardt’s Algorithm from “Dead Reckoning: Calculating without instruments”.

This is a remarkably bad approximate logarithm.

flog had better outperform it! It is provided merely for comparison.