numeric-prelude-0.4: An experimental alternative hierarchy of numeric type classes

Portabilitymulti-parameter type classes (VectorSpace.hs, Normalization.hs)
Stabilityprovisional
Maintainernumericprelude@henning-thielemann.de
Safe HaskellNone

Number.Physical.Show

Description

Convert a physical value to a human readable string.

Synopsis

Documentation

showNat :: (Ord i, Show v, C a, Ord a, C a v) => T i a -> T i v -> StringSource

Show the physical quantity in a human readable form with respect to a given unit data base.

showSplit :: (Ord i, Show v, C a, Ord a, C a v) => T i a -> T i v -> (v, String)Source

Returns the rescaled value as number and the unit as string. The value can be used re-scale connected values and display them under the label of the unit

showScaled :: (Ord i, Show v, Ord a, C a, C a v) => v -> [UnitSet i a] -> (v, String)Source

chooseScale :: (Ord i, Show v, Ord a, C a, C a v) => v -> UnitSet i a -> (v, Scale a)Source

Choose a scale where the number becomes handy and return the scaled number and the corresponding scale.

findCloseScale :: (Ord a, C a) => a -> [Scale a] -> Scale aSource

totalDefScale :: C a => T i a -> aSource

unused

getUnit :: C a => String -> T i a -> T i aSource

unused