Modulenumeric-prelude-0.4.4Haskell98
Number.Physical.UnitDatabase
Tools for creating a data base of physical units and for extracting data from it
- 5 types
- 19 values
- Packagenumeric-prelude-0.4.4
- Exports24
- LanguageHaskell98
- LicenceBSD-3-Clause
- SourceUnitDatabase.hs
Constructors
InitUnitSetinitUnit :: T iinitIndependent :: BoolinitScales :: [InitScale a]
Constructors
InitScaleinitSymbol :: StringinitMag :: ainitIsUnit :: BoolinitDefault :: Bool
An entry for a unit and there scalings.
Constructors
UnitSetunit :: T iindependent :: BooldefScaleIx :: Intreciprocal :: BoolIf True the symbols must be preceded with a /. Though it sounds like an attribute of Scale it must be the same for all scales and we need it to sort positive powered unitsets to the front of the list of unit components.
scales :: [Scale a]
Raise all scales of a unit and the unit itself to the n-th power
Reorder the unit components in a way that the units with positive exponents lead the list.
Decompose a complex unit into common ones
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