numeric-prelude-0.4.4: An experimental alternative hierarchy of numeric type classes
Safe HaskellNone
LanguageHaskell98

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 -> String Source #

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 a Source #

totalDefScale :: C a => T i a -> a Source #

unused

getUnit :: C a => String -> T i a -> T i a Source #

unused