sclang math functions.
- bitChar :: Char -> Bool
- parseBits :: (Num a, Bits a) => String -> a
- exprandrng :: Floating b => b -> b -> b -> b
- inf :: Bounded a => a
- isInf :: (Eq a, Bounded a) => a -> Bool
- linexp :: (Ord a, Floating a) => a -> a -> a -> a -> a -> a
- log10 :: Floating a => a -> a
- rmsToDb :: Floating a => a -> a
- dbToRms :: Floating a => a -> a
- powToDb :: Floating a => a -> a
- dbToPow :: Floating a => a -> a
Parse a sequence of 0 and 1 characters as a BE bit sequence
parseBits "101" == 5 parseBits "00001111" == 15
SimpleNumber.exprand that shifts a linear (0,1)
value to an exponential distribution.
map (floor . exprandrng 10 100) [0,0.5,1] == [10,31,100]
SimpleNumber.linexp shifts from linear to exponential ranges.
map (floor . linexp 1 2 10 100) [1,1.5,2] == [10,31,100]