HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Modulenumeric-prelude-0.4.4Haskell98

Number.Physical.UnitDatabase

Tools for creating a data base of physical units and for extracting data from it

Synopsis
datadata UnitSet i a

An entry for a unit and there scalings.

Constructors

Instances1Show
  • (Show i, Show a) => Show (UnitSet i a)Defined in numeric-prelude-0.4.4 · Number.Physical.UnitDatabase
valueevalDist
  1. :: (Ord i, C a)
  2. => T i
  3. -> T i a
  4. -> [(UnitSet i a, Int)]

    (UnitSet,distance) the UnitSet may contain powered units

#
valuefindMinExp :: [(Int, Int)] -> (Int, Int)

Find the exponent that lead to minimal distance Since the list is infinite maximum will fail but the sequence is convex and thus we can abort when the distance stop falling